rustwasm / book

The Rust and WebAssembly Book
https://rustwasm.github.io/docs/book/
MIT License
1.73k stars 208 forks source link

Perhaps mention FixedBitSet implementation will be dramatically slower and or --release #188

Open rbtcollins opened 4 years ago

rbtcollins commented 4 years ago

The fixedbitset implementation in the book is dramatically slower (2.5x or so) - in the WASM tick(), not in the JS canvas code. This is perhaps expected, though I don't have time to do a full analysis now; simply passing --release isn't enough to magically fix it... though it does improve the performance of the byte aligned storage.

I think its important if talking about performance tradeoffs ('waste of memory') to talk about what else is being gained ('but it is faster') :).

Please mention that the basic implementation started with in the book is faster.