
Maybe a bit of a niche feature request, but it would be nice if we had memset variants for blocks of values that take up multiple bytes, like how peek & poke now have variants for i16, i32, and i64 with peek2/poke2, peek4/poke4, and peek8/poke8 respectively. As it stands, initializing/filling a memory-mapped block of n values of anything other than bytes requires n instructions plus the cost of a for loop, so having the ability to reduce that to a single function call would be a great boon!



It doesn't have to cost n instructions if you use userdata! The easiest way is with :lerp(), but you can use overlapping evaluations, as outlined here: https://www.lexaloffle.com/dl/docs/picotron_manual.html#Overlapping_Evaluations
[Please log in to post a comment]