[racket-dev] member like assoc

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Jun 10 08:01:57 EDT 2013

Thanks.

On Sunday, June 9, 2013, Asumu Takikawa wrote:

> On 2013-06-09 21:15:31 -0500, Robby Findler wrote:
> >    Sorry: I should have been clearer: I would only expect a difference
> when
> >    the list is short (so your benchmark 2).
>
> Here're the numbers for that:
>
>   #lang racket/base
>   (define lst '(a b c))
>   (time
>     (for ([i (in-range 30000000)])
>       (member 'b lst)))
>
>   ;;; NEW BRANCH
>   $ racket member-benchmark-4.rkt
>   cpu time: 1408 real time: 1414 gc time: 0
>   $ racket --no-jit member-benchmark-4.rkt
>   cpu time: 3724 real time: 3731 gc time: 0
>
>   ;;; MASTER
>   $ racket member-benchmark-4.rkt
>   cpu time: 1380 real time: 1384 gc time: 0
>   $ racket --no-jit member-benchmark-4.rkt
>   cpu time: 3616 real time: 3622 gc time: 0
>
> Cheers,
> Asumu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130610/d33d1574/attachment.html>

Posted on the dev mailing list.