[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Map and filter without intermediate tables
- From: Geoff Leyland <geoff_leyland@...>
- Date: Thu, 7 Jun 2012 15:39:52 +1200
Hi,
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?
Cheers,
Geoff
[1] https://gist.github.com/2886368