Open algorithmx opened 1 year ago
You're not seeing BitSet()
itself, but rather you're seeing the cost of GC. I'd recommend taking a look at your allocations with the allocation profiler and seeing if there's anything you can improve there.
that said, BitSet()
is about 2x slower than it could be. It's a known issue that array creation is slower than it should be, https://github.com/JuliaLang/julia/issues/45160, and the resize!
is also slower than it should be because it is calling out to C and has to recompute all the information about the array even though we just created it and therefore know everything about it.
https://github.com/JuliaLang/julia/blob/4af6be80f238fce9cd124925d488a4c7171cf74a/base/bitset.jl#L18
Dear Julia developers,
I work in a company and we build TCAD simulators using Julia.
I have been optimising my code and realised that creating empty
BitSet()
takes significant amount of time. Below are the prof and memprof results. Please help me to get over of this overhead, if it is possible. Thank you!