[racket] Looking for feedback on code style

From: Jos Koot (jos.koot at telefonica.net)
Date: Tue Sep 14 13:00:19 EDT 2010

 

> -----Original Message-----
> From: robby.findler at gmail.com 
> [mailto:robby.findler at gmail.com] On Behalf Of Robby Findler
> Sent: 14 September 2010 17:16
> To: Stephen Bloch
> Cc: Jos Koot; users at racket-lang.org
> Subject: Re: [racket] Looking for feedback on code style
> 
> I think that racket guarantees that no vector has more 
> elements than the size of the largest fixnum (to support 
> optimizations).
> 
> Also, Jos: you might want to use time-apply.

Yes, that would be simpler.
Thanks, Jos

> 
> Robby
> 
> On Tue, Sep 14, 2010 at 9:56 AM, Stephen Bloch 
> <sbloch at adelphi.edu> wrote:
> >
> > On Sep 14, 2010, at 10:37 AM, Jos Koot wrote:
> >
> >> The following measurement shows O(n).
> >> But O(n) = O(C+n) where C may be a big number.
> >
> > More relevantly, O(n) is hard to distinguish experimentally 
> from O(n log n).  In particular, all the sizes you seem to 
> tried are well within a machine word, so I would expect O(n) 
> behavior in that region (for reasons that other people have 
> already pointed out).
> >
> > Big-O notation is about what happens _in the long run_, as 
> you "approach infinity".  Any experimental analysis will only 
> tell you about a finite region, so it can't confirm or deny 
> any big-O estimate.  Of course, if your "finite region" 
> covers all the problem sizes you will ever realistically want 
> to solve, then an experimental analysis is actually more 
> informative than a big-O estimate.
> >
> >
> >
> > Stephen Bloch
> > sbloch at adelphi.edu
> >
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/users
> >




Posted on the users mailing list.