lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


As far as I can tell, the implementations of map and filter in penlight.tablex create intermediate tables of results.  Surely that's inefficient?

Now that 5.2 has __pairs (or if you write your own __pairs-aware pairs in 5.1), has anyone tried maps and filters that don't use intermediate tables?  

I did, and it was slower than using intermediate tables (and more complicated.  It did save some memory though).  Is it a dead-end idea, or is it that my implementation [1] is brain dead?