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

Not really into high speed javascript, but wouldn't you be able to achieve the same kind of memory reuse by simply using factory methods patterns that would reuse object instance from a pool instead of reallocating ? It's the same kind of tricks we use in ios / android programming when we want to avoid memory allocation or garbage collections...


Using the pattern you describe you could only reuse the same kinds of objects. With a general heap you could reuse the memory for arbitrary structures.




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: