Skip to content

Commit

Permalink
Moved macro-related functions to start of core Env
Browse files Browse the repository at this point in the history
Changes the performance test 3 from ~ 3500/s to ~4300/s

Probably indicates that Env lookups are a big part of the
runtime.
  • Loading branch information
bendudson committed Dec 27, 2017
1 parent 331ddfe commit 860f35a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nasm/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ core_environment:
xor rsi, rsi ; Set outer to nil
call env_new
mov rsi, rax ; Environment in RSI
core_env_native core_cons_symbol, core_cons
core_env_native core_concat_symbol, core_concat
core_env_native core_first_symbol, core_first
core_env_native core_rest_symbol, core_rest
core_env_native core_nth_symbol, core_nth

core_env_native core_add_symbol, core_add
core_env_native core_sub_symbol, core_sub
Expand Down Expand Up @@ -224,13 +231,6 @@ core_environment:
core_env_native core_atomp_symbol, core_atomp
core_env_native core_reset_symbol, core_reset
core_env_native core_swap_symbol, core_swap

core_env_native core_cons_symbol, core_cons
core_env_native core_concat_symbol, core_concat
core_env_native core_first_symbol, core_first
core_env_native core_rest_symbol, core_rest
core_env_native core_nth_symbol, core_nth
core_env_native core_nilp_symbol, core_nilp
core_env_native core_truep_symbol, core_truep
Expand Down

0 comments on commit 860f35a

Please sign in to comment.