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

> The reality is you still have to free resources, so it's not like the garbage collector is doing work that doesn't need to be done.

As others have pointed out, this isn't true for many video games. People write things so they're allocated upfront as much as possible and reuse the memory. A lot of old games had fixed addresses for everything as they used all available memory (this allowed for things like Gameshark cheats).

But there's a secondary issue. A GC imposes costs for the memory you never free. It doesn't know the data will never be freed, so it'll periodically check to see if the data is still reachable. Some applications have work arounds for this like using array offsets instead of pointers/references (fewer pointers to follow).



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

Search: