mackuba,
@mackuba@martianbase.net avatar

Ok, looks like we have a winner… 🏆 , run directly from as a native module, using this tool: https://github.com/matsadler/magnus. Should give me a 2-4x total speedup (regex matching is 15x faster, but some of that time is reading data from SQLite & ActiveRecord). JS via mini_racer works ok too.

mackuba,
@mackuba@martianbase.net avatar

The module code is actually super short, just two short functions, less than a page total. I'll try to wrap it into a gem at some point, because it's totally generic and could be used in other projects to speed up regex matching 🦀 The configs to build it took me a while to figure out though since I've never made a native gem before.

(One small caveat though is that it doesn't support regexps with "lookbehind" sections, I had to work around that a bit on the side)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust
  • thenastyranch
  • magazineikmin
  • khanakhh
  • osvaldo12
  • ngwrru68w68
  • GTA5RPClips
  • tacticalgear
  • Youngstown
  • slotface
  • everett
  • kavyap
  • DreamBathrooms
  • mdbf
  • rosin
  • JUstTest
  • InstantRegret
  • ethstaker
  • cisconetworking
  • Leos
  • Durango
  • tester
  • cubers
  • modclub
  • normalnudes
  • provamag3
  • megavids
  • anitta
  • lostlight
  • All magazines