Skip to content

Commit

Permalink
comment fix: it's 8ns *faster*
Browse files Browse the repository at this point in the history
  • Loading branch information
edef1c committed Apr 16, 2015
1 parent a1e4c2b commit 52325b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/arch/x86_64/swap.s
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ jmp 2f
movq %rax, %rsp

// jump into the new context (return to the call point)
// doing this instead of a straight `ret` is 8ns slower,
// presumably because the branch predictor tries to be clever about it
// doing this instead of a straight `ret` is 8ns faster,
// presumably because the branch predictor tries
// to be clever about it otherwise
popq %rax
jmpq *%rax

Expand Down

0 comments on commit 52325b0

Please sign in to comment.