Hi Rex,
I'm not able to reproduce timings by pulling them in. Here is the
code:
https://gist.github.com/1524670
Results are:
[info] Running C
tailrec match foldLeft2: warming...
Elapsed: 0.024
tailrec if/else foldLeft3: warming...
Elapsed: 0.045
lib foldLeft: warming...
Elapsed: 0.068
pulled-in foldLeft: warming...
Elapsed: 0.069
Implementation of lots and time implementation may seem familiar, I
took them from one of your stackoverflow post.
Victor's is slower which is really odd. Probably my methodology is
flawed...
Jean-Laurent
On Dec 27, 9:33 am, Rex Kerr <
icho...@gmail.com> wrote:
> You're just measuring the overhead of being in the collections hierarchy.
> If you extract the library method into your own function, you find that the
> times are identical.
>
> (In fact, Viktor's seems exactly identical to the library version in speed,
> while yours is perhaps 3-4% slower.)
>
> There does seem to be a ~15% performance penalty from being part of the
> collections hierarchy.
>
> --Rex
>
>
>
>
>
>
>
> On Tue, Dec 27, 2011 at 12:02 PM, huynhjl <
huyn...@gmail.com> wrote:
> > Hi All,
>
> > I just noticed while exploring various implementations of foldRight at
>
> >
http://stackoverflow.com/questions/8549433/is-it-possible-to-use-cont...