Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate parens in refinement dispatch, ~10% speedup #145

Merged
merged 1 commit into from
Nov 5, 2015
Merged

Evaluate parens in refinement dispatch, ~10% speedup #145

merged 1 commit into from
Nov 5, 2015

Conversation

hostilefork
Copy link
Member

The previous semi-hack of an evaluation trick so that get-words would
evaluate in paths has been upgraded to a much less hacky trick. This
now allows for the evaluation of parens to also be used to get the words
to use as refinements in dispatch:

>> append/(first [only])/(to-word "dup") [a b c] [d e] 2
== [a b c [d e] [d e]]

The method by which this is done--as well as reducing the number of
writes done into call frames--has improved performance in a build of
the hostilefork.com using the static builder by 10%. This means Ren/C
optimized non-debug builds are--for the first time--ever so slightly
faster than the rebolsource download (in that measurement).

The previous semi-hack of an evaluation trick so that get-words would
evaluate in paths has been upgraded to a much less hacky trick.  This
now allows for the evaluation of parens to be used to get the words to
use as refinements in dispatch:

    >> append/(first [only])/(to-word "dup") [a b c] [d e] 2
    == [a b c [d e] [d e]]

The method by which this is done--as well as reducing the number of
writes done into call frames--has improved performance in a build of
the hostilefork.com using the static builder by 10%.  This means Ren/C
optimized non-debug builds are--for the first time--are ever so slightly
faster than the rebolsource download (in that measurement).
@hostilefork hostilefork merged commit 0c76e51 into metaeducation:master Nov 5, 2015
@hostilefork hostilefork deleted the eval-paren-refinements branch November 5, 2015 09:43
@hostilefork
Copy link
Member Author

Note that this commit had a somewhat naively-introduced bug with refinement ordering, where for something like a: func [x /b y /c z] would not treat a/b/c 1 2 3 and a/c/b 1 3 2 as equivalent calls

The impact on performance after the fix has not been measured yet after the fix (and there have been several other changes as part of the rewrite).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant