News for hackers. Stuff that matters.
Re:How fast can we make interpreted Python? by iskander on Tuesday June 25, 2013 @11:21PM (#5943979)
>Rearrange your instruction bodies based on execution / transition frequencies to improve instruction cache performance.

Do you mean...group all the frequent operations together so they overlap on cache lines? It's hard to tell how much this would help, have you tried it?

Re:How fast can we make interpreted Python? by cwzwarich on Wednesday June 26, 2013 @12:09AM (#5944134)
When I was working on WebKit we would rearrange instruction bodies to influence the generated code based on opcode statistics, but back then the interpreter was using computed goto, so there wasn't quite a direct connection between the placement of the input code and the generated code. It's unlikely that any two instruction implementations will overlap on cache lines, since they are all typically larger than a cache line, but more temporal coherency throughout code execution will improve performance, especially on CPUs with smaller caches.

You can do it automatically by gathering statistics on frequent instruction pairs. In practice greedy algorithms for code scheduling work fairly well, assuming you have meaningful statistics.

Re:How fast can we make interpreted Python? by mentat on Tuesday June 25, 2013 @11:49PM (#5944079)
Looks like he's contributed significantly to the Webkit javascript interpreter: https://www.webkit.org/blog/196/cameron-zwarich-is-a-webkit-...