Hi, first time poster, recovering C developer from the 90’s, long time Rubyist, and roughly 2 yrs long admirer (but not practitioner) of Crystal.
I see that there’s a directive called @[AlwaysInline] that can be applied at the method level.
I’m working on a PoC for a stream cipher and the code is hastily written against collections / enumerables code, thrashing the GC (as expected) in both TruffleRuby and MRI (JRuby in fact is slower than MRI for my PoC). Kotlin has a bevy of features to tap into the JVM’s JIT compiler to solve these kinds of issues, but my appetite is pretty low for discovering obscure tweaks and design patterns by trial-and-error.
Are there any tips for not loading up the GC in Crystal without resorting to boxing off data and pipelining it through a lot of tedious for loops w/ unsafe pointers?
-a lazy, no good hack