3 ms·
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 reu
by bsaul 15y ago
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...
- VMG 15y agoUsing 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.