I wonder if the new regexp code in Ruby 2.4 would address some of that
- Switching from =~ to Regex.match? did not yield significant speed improvement
- Without any changes though, 2.4.0-preview1 ran the stemming in 19s, compared to the 25s on 2.3.1.
The ruby stemmer I used is this one: https://github.com/NeilNjae/porter2stemmer