On 14/12/2007, Nick Apperson <[EMAIL PROTECTED]> wrote:

> C++ is "faster" than C because the STL (and other generic code) allows the
> programmer to spend their precious time optimizing the bottleneck and using
> a very fast default for less critical places.  For a sufficiently small
> program however I will wager that given enough time, C will be exactly the
> same speed as C++ if the programmers involved are both good.

The C++ generics are also on the surface faster than (for example) the
Java generics (which I use). This is because whereas C++ compiles and
optimises a class for every instantiated generic, Java uses a single
class and is thus unable optimise for specific cases.

This makes C++ generics faster, except in the case where the
bottleneck is how much can be fitted in the cache, which the fact that
Java hasn't multiplied it's generic classes may give it the advantage.

Yes, as you can tell, I'm bitter about this particular design decision.

cheers
stuart
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to