ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 227 words in the discussion.
Trending Topics
#code#assembly#using#predicted#performance#blog#post#rule#forward#branch

Discussion (3 Comments)Read Original on HackerNews
Mechanically, it pushes down forward the 'unlikely' code, and with semantic knowledge of how 'hot' a code is, you can, very easily hierarchically refactor (assembly) code to really favor the 'likely' code, that in a intensity spectrum.
Basically speaking, mostly all 'expected' code will be nicely packed and predicted, and you can do that at various scale (yes, it works for huge code paths).
It is beautiful :)
I wonder if x86_64 hardware follows that rule (I think I read it for intel, but not AMD).
I managed to get around 8192 using Serge Skoredin's approach from the blog post last year: https://skoredin.pro/blog/golang/cpu-cache-friendly-go
Also tried some of the techniques in this blog post, and managed to squeeze a bit more with the insights from your post.