Closed lenguyenthanh closed 1 year ago
do you use this metals command? it might provide some insight
yes, I started to use that recently and with async-profiler
to understand more about what happen under the hood.
Here is one example I got after running bench-marking with async-profiler.
We can see that, just for Bitboard.contains
it required much more than what needed.
I guess scalalib.newtypes
are over kill for Bitboard
Maybe some inline
for Bitboard.contains
can help a bit in this case, but I think, we can have a much bigger gain if we migrated Bitboard from scalalib.newtypes
.
close with #449
As demonstrated in #441, we may have a significant gain in performance by switching from
Bitboard
toLong
.I guess the performance penalty is mostly caused by
TotalWrapper
because with it,Bitboard
is be boxed object , not just a primitive Long anymore.But maybe the opaque type has some responsibility as well.