Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid pushf/popf - 25% win
  • Loading branch information
tadeuzagallo committed May 6, 2016
1 parent b822023 commit 69d38b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/interpreter.S
Expand Up @@ -125,13 +125,11 @@ _op_call:
// check tag
rol $8, %rcx
test $CLOSURE_TAG, %cl
pushf
shr $8, %rcx
popf
jnz _call_closure
jmp _call_builtin

_call_builtin:
shr $8, %rcx
push %rdi
ccall *%rcx
pop %rdi
Expand All @@ -140,6 +138,7 @@ _call_builtin:
skip $1

_call_closure:
shr $8, %rcx
push %BYTECODE
push %rdi
push %rbp
Expand Down

0 comments on commit 69d38b8

Please sign in to comment.