rustwasm / book

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

Add a note about refactoring after improving performance #123

Open jwir3 opened 5 years ago

jwir3 commented 5 years ago

In the time profiling section, the book recommends improving performance by splitting the rendering into two passes: one for "alive" cells and one for "dead" cells. This does, indeed, improve performance, but there is quite a bit of code duplication. We should add a note on how to refactor this to make it clear that this is something that developers should be thinking about.