kostya / benchmarks

Some benchmarks of different languages
MIT License
2.8k stars 253 forks source link

Use BitSet instead of ArrayBuffer to store primes #464

Closed odd closed 1 year ago

odd commented 1 year ago

By switching to using a scala.collection.mutable.BitSet instead of an scala.collection.mutable.ArrayBuffer for storing the primes (as is done in the Java variant) the performance can be improved.