logoalt Hacker News

forintitoday at 11:33 AM3 repliesview on HN

So if you need speed, you just have to swallow your OO programmer's pride and put your data in arrays.


Replies

jayd16today at 1:50 PM

If you have hot loops with millions of iterations at a time, structure your code accordingly. Its not anti-OO to choose the right data structure for the job.

bob1029today at 12:57 PM

And avoid moving said data between physical threads as much as possible.

Most of the bottlenecks I see are not due to the organization of data. Unnecessary communication of data is the #1 offender.

show 1 reply
theandrewbaileytoday at 11:40 AM

Maybe someone can write an OO language where arrays of structs are automatically stored as structs of arrays.

mild /s

show 3 replies