Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't see how the use of std::array<int,3> and std::count makes the C++ version less functional. Also, the next_forests.reserve doesn't help as much as you state, it's barely measurable when commenting out from my experiments (try it out!).


C++ version is not "less functional". It is not functional at all. To make it functional you'd have to use immutable state.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: