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

Is it? Please tell me because I had the same question.

From the programmer's PoV, having no pointers gives little to no benefit. From the CPU's PoV, (in c/c++) indices become pointers anyway. Maybe the compiler can optimise more easily, but that's not obvious.

Cache coherence is the key goal, but you can do that with pointers easily enough.



I haven't looked at the code, but my guess would be that the whole data structure lives in a single chunk of RAM, and the tree is described as offsets to a base address (so probably more compact than with embedded pointers).

Of course reading the values at each offset will require constructing a pointer address, but if the whole chunk can fit in the L2 data cache then reading those values at the calculated address will be very fast since the whole data structure is in cache.

The aim isn't a compiler optimization, but a runtime on CPU core optimization.




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

Search: