[racket] [BULK] Re: Looking for feedback on code style

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Mon Sep 13 18:30:27 EDT 2010

Chris Stephenson wrote:

> But, on the other hand, O(log n) is, for most practical purposes, very
> close to O(1), so why worry?

Because we're not consistent about when we worry and when we don't. This 
thread, for example, is mostly about logarithmic factors. And we 
wouldn't accept a statement like "Sorting n numbers takes O(n) time". 
But we ask our students to implement in, say, C++, where it's obvious 
that log n <= 32 or 64, and bit-twiddling tricks that are hard to resist 
fall outside the rules, really. Working in a purely functional language 
delays these issues, thankfully. --PR

Posted on the users mailing list.