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

> Why would you have 4 cache misses for a 128-byte record?

I wrote earlier "if your cache line is 32 bytes".

If you need all the fields - you will have 4 cache misses. If you need only some of the fields, and they all fall into 1 cache line, then -- as you said, you will only have one cache miss.

My point (poorly worded, upon rereading, but I didn't have much time, dayjob and all...) was that the potential advantage of record-major does NOT increase beyond what is packed into one cache line -- so it is a small constant, rather than deserving of O() notation.

> I didn't make the original wager. :)

Ah, apologies. (But maybe you'd still let me take your money? :) )



> My point (poorly worded, upon rereading, but I didn't have much time, dayjob and all...) was that the potential advantage of record-major does NOT increase beyond what is packed into one cache line -- so it is a small constant, rather than deserving of O() notation.

I see what you mean, now. You're right that it's a constant multiplier.




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

Search: