Reduce allocations & lock conflicts and speed up when using multithreads

Stephen
Mon, 10 Feb 2025 14:01:31 +0000
Performance

Hello there, performance enhancement help wanted:
Initial function (click for more details)
which gives

309.934138 seconds (5.00 M allocations: 1.982 GiB, 0.23% gc time, 2007 lock conflicts, 0.52% compilation time)
48-element Vector{String}:

After asking GPT, I got an optimized version:
Optimized (click for more details)
this gives:

80.924692 seconds (3.92 M allocations: 1.925 GiB, 1.28% gc time, 4950 lock conflicts)
48-element Vector{String}:

Can it be further optimized？
I also tried pmap() for distributed computing:
Distributed Computing (click for more details)
but it is even worse (more than 15 minutes), so I gave it up

2 posts - 2 participants

Read full topic