Re: [perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-27 Thread Elizabeth Mattijsen via RT
It’s really in the dispatch within Cool. Note the difference between: for ^1 { 1.match(/1/) } and: for ^1 { "1".match(/1/) } I’m afraid this is really uncovering a basic dispatch caching issue. I have tried a few things, but I’m afraid this is really an issue inside

Re: [perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-27 Thread Elizabeth Mattijsen
It’s really in the dispatch within Cool. Note the difference between: for ^1 { 1.match(/1/) } and: for ^1 { "1".match(/1/) } I’m afraid this is really uncovering a basic dispatch caching issue. I have tried a few things, but I’m afraid this is really an issue inside

[perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-27 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Oh! You're totally right! Then, it's not as bad as it looks. In fact, this commit actually *improved* the case when it has to match Str-s (more than 2x speedup). So perhaps the slowdown is not so critical. After all, how often do people match thousands of Ints… On 2017-07-26 23:55:21,

Re: [perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-27 Thread Elizabeth Mattijsen
Looking at the profile of (^1).grep({!/1/}).elems.say the first 5 entries (responsible for 70% of CPU in that example) have nothing to do with matching, but everything with trying to find the right dispatchee. And it looks like this is basically caused by: $_ = 1; /1/ Because $_

Re: [perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-27 Thread Elizabeth Mattijsen via RT
Looking at the profile of (^1).grep({!/1/}).elems.say the first 5 entries (responsible for 70% of CPU in that example) have nothing to do with matching, but everything with trying to find the right dispatchee. And it looks like this is basically caused by: $_ = 1; /1/ Because $_

[perl #131805] [REGRESSION] [PERF] .grep-ing with a code block is now almost twice slower ( .grep({/foo/}) )

2017-07-26 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #131805] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131805 > See this benchable6 output: