Skip to content
Permalink
Browse files

Activate the Hyper refactor

- in the simplest way, by taking over the HYPER proto
- makes simple cases such @A <<+>> @A, @A <<+ 42 between 1.4x and 1.8x as fast
- more complicated cases benefit more from needing to pass fewer parameters
- no other code is removed yet: this is yet to come
  • Loading branch information...
lizmat committed Nov 9, 2018
1 parent ec2848c commit f06e8582fe6da9a04dcacab34b2e9c0d3c31602f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/metaops.pm6
@@ -522,7 +522,9 @@ sub METAOP_HYPER_PREFIX(\op) {

sub METAOP_HYPER_CALL(\list, |args) { deepmap(-> $c { $c(|args) }, list) }

proto sub HYPER(|) {*}
proto sub HYPER(\operator, :$dwim-left, :$dwim-right, |c) {
Hyper.new(operator, :$dwim-left, :$dwim-right).infix(|c)
}

multi sub HYPER(&op, \left, \right, :$dwim-left, :$dwim-right) {
op(left, right);

0 comments on commit f06e858

Please sign in to comment.
You can’t perform that action at this time.