Re: Teaching new tricks to an old dog (C++ -->Ada)

From: Ioannis Vranos (ivr_at_remove.this.grad.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 11:02:16 +0200

Georg Bauhaus wrote:

>> I forgot to say here that the cost of map's operator[] is O(log(n))
>> which is fairly cheap for large amount of data.
>
>
> compare O(log(n)) to O(1) where n is 1, 1000, 1_000_000.
> Make this access a part of an inner loop.

If you do the maths, you will see that log(10^6) isn't that large.

-- 
Ioannis Vranos
http://www23.brinkster.com/noicys


Relevant Pages

  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... >> which is fairly cheap for large amount of data. ... > Make this access a part of an inner loop. ... Ioannis Vranos ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... > Georg Bauhaus wrote: ... > which is fairly cheap for large amount of data. ... Make this access a part of an inner loop. ...
    (comp.lang.cpp)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... > Georg Bauhaus wrote: ... > which is fairly cheap for large amount of data. ... Make this access a part of an inner loop. ...
    (comp.lang.ada)
  • Re: Lincoln 175 and .035 mig wire
    ... machine didn't make it to the location, it was new looking when I bought it. ... the feed system looks as cheap as they get but I have ... never had any problems and I have feed a good amount. ... the welding current so its not as dead on as the volts move a bit. ...
    (sci.engr.joining.welding)
  • Re: Craigslist BS
    ... Some people change their amount when that happens, ... is pinball collectors tend to be really picky. ... Ive been offered crazy lowball amounts for items Ive sold on CL. ... everything on CL has to be a stupid cheap deal. ...
    (rec.games.pinball)