[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++
From: |
Sam Mason |
Subject: |
Re: C++ |
Date: |
Thu, 24 Sep 2009 11:52:13 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Thu, Sep 24, 2009 at 08:51:49AM +0200, Tom Bachmann wrote:
> Jonathan S. Shapiro wrote:
> > we downgraded from C++
> >back to C in Coyotos, and that doing so simultaneously reduced
> >complexity and increased performance.
>
> That's interesting to hear. Any specific reasons? (When looking at the
> pistachio source every now and then, I think I can somewhat imagine why.)
I've written application code that was 30 times faster when it was
written in C (i.e. lots of arrays) vs. C++ (with a nice easy to
understand class hierarchy). Algorithmically they were the same and
this was after we spent a while trying to get them running at the same
speed. Given than a run of the C code takes a week or two, the C++
version wasn't really usable even if it was "prettier" and easier to
change.
As far as I could tell it was because the CPU just couldn't predict
the memory reads well enough and hence it was limited by main memory
latency, in C with simple arrays this wasn't a problem. It could also
exploit things like RLE of in memory data structures, but this shouldn't
have affected things this much.
--
Sam http://samason.me.uk/
- Re: C++ (was: Broken dream of mine :( ), (continued)
Re: Broken dream of mine :(, arnuld uttre, 2009/09/17
C++ (was: Broken dream of mine :( ), olafBuddenhagen, 2009/09/23
- Re: C++, Bas Wijnen, 2009/09/23
- Re: C++, Tom Bachmann, 2009/09/23
- Re: C++, Jonathan S. Shapiro, 2009/09/23
- Re: C++, Tom Bachmann, 2009/09/24
- Re: C++, Michal Suchanek, 2009/09/24
- Re: C++,
Sam Mason <=
- Re: C++, Arne Babenhauserheide, 2009/09/24
- Re: C++, Sam Mason, 2009/09/24
- Re: C++, Lluis, 2009/09/24
- Re: C++, Bas Wijnen, 2009/09/24
- Re: C++, Jonathan S. Shapiro, 2009/09/24
- Re: C++, Arne Babenhauserheide, 2009/09/25
Re: C++, Jonathan S. Shapiro, 2009/09/24
Re: C++, Bas Wijnen, 2009/09/25
Re: Broken dream of mine :(, Arne Babenhauserheide, 2009/09/16