Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created October 31, 2016 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/6e5d51c186915835d1d611b191049a20 to your computer and use it in GitHub Desktop.
Save Whateverable/6e5d51c186915835d1d611b191049a20 to your computer and use it in GitHub Desktop.
bisectable6
for 42 { say "foo".match(/foo/); say $/ }
Bisecting: 1151 revisions left to test after this (roughly 10 steps)
[2126eda519696f4668d46b46eb257a5e26c88bc6] Add protection against circular dependencies in precompilation
»»»»» Testing 2126eda519696f4668d46b46eb257a5e26c88bc6
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 92d5e766d08c19beeafc63fad099bc1ed540e85a
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing b3c92baad264146f9e7dd7308f3064c3d7e18be2
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing cff3437de58ef36a9a2a84915ee9181643af4348
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 1794328cfb319249d35c9ca3e08c2adac2b8f529
»»»»» Script output:
「foo」
Nil
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 8a72a40a47a048e048ce0ce7cce24f43d92490cc
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 79bb8671454171bed3ece027b8facfe56d6665f5
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing c9425931ba8c5622c03e1bf88747c69e54092280
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 41e2572051967dc391de33ea6339b2389bd5728e
»»»»» Script output:
「foo」
Nil
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 127b3be424e3119ac6f1aed4673ad0fc1c50fb10
»»»»» Script output:
「foo」
「foo」
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is identical
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing b7201a8f22338a906f2d8027a21387e8f5c77f41
»»»»» Script output:
「foo」
Nil
»»»»» Script exit code: 0
»»»»» Bisecting by output
»»»»» Output on “old” revision is:
「foo」
「foo」
»»»»» The output is different
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
b7201a8f22338a906f2d8027a21387e8f5c77f41 is the first new commit
commit b7201a8f22338a906f2d8027a21387e8f5c77f41
Author: Elizabeth Mattijsen <liz@dijkmat.nl>
Date: Sun Oct 23 21:52:51 2016 +0200
Completely re-imagine Str.match internals
Simple matches without any modifying adverbs is about 1.5x faster.
Complicated setups like with :nth(1,3..*), :3x are about 14x faster.
Other mixes of parameters are generally in the 2x to 3x faster range.
Two semantic changes: (see RT #129945): the family of :nth (as in :st,
:nd, :rd and :th) are now lazy and will return whatever they can find.
Before all matches would be cached to find out if enough matches were
found and none would be returned if not enough were found. Please
use an additional :x for that if you want that behaviour. Also, when
using .nth with an iterator using non-monotonically increasing index
values, it will now die, instead of silently not producing the Matchi
object associated with the non-monotonically increasing index value.
How this was done:
- use MMD for handling single adverb calls faster
- rewrite all (private) methods using nqp
- use iterators instead of gather/take combo's
- use new "skip-one" iterator methods wherever possible
- don't use signatures for multiple named variables
- pass $/ to be set around as a parameter
:040000 040000 310922caf347317b45596f65c9a108c5b4ef6836 898eea463f82db6215203f8380e2753429a1a439 M src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment