Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Make a faster List.pick(*,:eager) version
Well, that was the idea. Turns out the eager version is about 20x *slower*. Added here for further research. What has been ruled out: - anything inside the loop That part of the code is mostly the same as the non-eager version. If the code inside the while loop is reduced to just the $elems = $elems - 1, even then the eager variant is about 15x slower. - something in the MMD dispatch If the code inside the "eager" variant is the same as the non-eager variant, there is no difference in execution noticeable either. - not SPESH related With MVM_SPESH_DISABLE=1 the difference in execution is even larger: the optimizer did its best! What *is* different? - the number of frames in a profile example code: my @A = ^100; for ^500 { @a.pick(*) } # or *, :eager non-eager / eager: 10618 / 176614 frames So the difference in number of frames is in same order of magnitude as the difference in CPU. So the question is really: why does the eager version create so many frames?
- Loading branch information