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

> If you could only focus on one aspect, I would keep the average temperature of L1 in mind constantly. If you can keep it semi-warm, nothing else really matters.

This is easy, as Dijkstra points out. Allocate an array ¾ the size of L1D, and write a subroutine to reverse its contents, but don't use the array otherwise. Call the useless reversal subroutine often enough (at the beginning of every other subroutine and loop body should generally be enough) that the CPU spends most of its time running it. That will ensure that most of your data references are to the array, and most of your instruction references are to the reversal subroutine, both of which are always in cache.

Other things do matter.



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

Search: