HackerTrans
トップ新着トレンドコメント過去質問紹介求人

superdimwit

no profile record

コメント

superdimwit
·2 年前·議論
Thanks!
superdimwit
·2 年前·議論
Clang recently got a new calling convention that makes these tail calls much cheaper (avoids the need for the caller to preserve some registers). I can never remember the name - it’s either preserve_all or preserve_none (whose perspective is the preservation from?).
superdimwit
·3 年前·議論
https://eli.thegreenplace.net/2012/07/12/computed-goto-for-e...

is a good summary
superdimwit
·3 年前·議論
On 1: this small amount of overhead matters because the amount of work you do on each opcode can be tiny. The extra jump could be 20% of your runtime! On 2: yes, this helps the indirect branch target predictor. In a real program you’ll often get repeated sequences of opcodes (increment, then compare) that can be predicted. These branch predictors can be pattern based.