4 ms·
I'm going to assume this bottlenecked-by-mem-alloc work isn't Ruby. The rule of thumb I personally go by is that if you're working in e.g. Ruby or Python it's
by mattdeboard 10y ago
I'm going to assume this bottlenecked-by-mem-alloc work isn't Ruby.
The rule of thumb I personally go by is that if you're working in e.g. Ruby or Python it's better to favor immutability over mutability because mem alloc will almost never be the problem.
I say this having worked on a Python (pypy) product where mem alloc WAS the bottleneck in a particular area. So I know it's not always true, but almost always. Probably preaching to the choir here :)
- EpicEng 10y agoI can't disagree with you there. In this context you're probably right 99% of the time