Picked up an old experiment which is so far somewhat promising
I love the sugar of using map/filter/reduce type functions on arrays, but the old-school owner of a 286 machine is bothered by the implied nested loops they incur
The experiment was simply:
at least
filter
andmap
should be able to be compiled into a single loop A. would the potential improvements of this be worthwhile? B. would they even remotely compete with compiled native bytecode equivalents?
This does that, and the answer to both of the above seems to be a resounding "yes"
I dunno - if you're implementing this stuff in an interpreter or compiler, then maybe try this approach instead?
ie. Consider them as syntactic sugar for further processing, rather than consumable implementation