On Monday 11 February 2002 02:10, Hal Daume III wrote: > So instaed of storing 1 and 2 in the list, it stores pointers to > them. The reason it does this is so that it makes it easy to generate > code for polymorhpic functions. (,) being boxed means that instead of > storing a pair of element, you're storing a pair of pointers. That means > you get worse performance because you have to chase more pointers. > > (at least that's my impression) Thanks, I knew the concept but not the name.
On Sunday 10 February 2002 18:48, Kirsten Chevalier wrote: > I'd guess that it's not just that you have to apply the (,) constructor -- > it also has to do with the fact that the tuples it's constructing here are > boxed. This brings another question to my mind, isn't it toupling a standard technique used in functional programming? I'm pretty sure I've seen it focused in some papers/text books. I for one would not expect that folding the list twice would be more efficient... J.A. _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
