Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Str.chomp between 10x and 100x faster
- 10x if nothing needed to be done - 100x if a newline needed to be removed Based again on the observation that nqp::substr will return self for whole strings, so the whole logic of .chomp could be caught in a single nqp::substr. Only worry is that: nqp::iscclass(nqp::const::CCLASS_NEWLINE,self,-1) may actually check out of bounds. If so, suggest that should be fixed in the VM, as making .chomp 100x faster for newline removal looks pretty important to me when using lines()
- Loading branch information