Hacker News new | past | comments | ask | show | jobs | submit login

Games work with time budgets of many milliseconds per frame, relatively long timescales from a cpu pov. It is rare to prefer predictable per iteration latency in loops over higher throughput unless the deferred batch of work is quite big. But of course this can compound in some cases, eg you have thousands of these arrays being extended in lockstep and they all trigger the extra work at the same time...



If the arrays are big enough for growing them to mess up your time budget, then it's quite likely that a linked list would already be failing.


Yep, and the associated dynamic memory allocation for LL nodes will still have latency spikes from the malloc implementation so its worst case latency is still bad.




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

Search: