[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Drawing the line between speed and simplicity/elegance
- From: Sean Conner <sean@...>
- Date: Sun, 10 May 2015 04:42:11 -0400
It was thus said that the Great Enrico Colombini once stated:
> On 10-May-15 02:53, Sean Conner wrote:
> > Just on a lark, I wrote two programs, one in pure Lua; the other one
> > pure
> >C. The programs calculate the Mandelbrot set (but don't output
> >anything---I
> >wanted just the pure calculations) [2]. Here are some timings:
> >
> > Lua in PUC-Lua: 52.7s
> > C: 2.7s (compiled with -O3)
> > Lua in LuaJIT: 2.5s
>
> Sean, out of curiosity, did you also measure with -Os?
Not intially. Let's see ... compile compile compile run run run and wow!
2.2s.
> I am asking this because, in a different context (a small
> microcontroller) I saw code emitted with -O3 that was slower than using
> -Os, despite 's' meaning 'size' and not 'speed'. It did strange things,
> such as jumping to a common piece of code (and back) from the middle of
> the part I was trying to optimize.
All this was done on a 32-bit 2.6GHz Penium 4. Your milage may vary on
other systems.
-spc
- References:
- Drawing the line between speed and simplicity/elegance, Brigham Toskin
- Re: Drawing the line between speed and simplicity/elegance, Soni L.
- Re: Drawing the line between speed and simplicity/elegance, Brigham Toskin
- Re: Drawing the line between speed and simplicity/elegance, Dirk Laurie
- Re: Drawing the line between speed and simplicity/elegance, Brigham Toskin
- Re: Drawing the line between speed and simplicity/elegance, Coda Highland
- Re: Drawing the line between speed and simplicity/elegance, Roberto Ierusalimschy
- Re: Drawing the line between speed and simplicity/elegance, Rena
- Re: Drawing the line between speed and simplicity/elegance, Sean Conner
- Re: Drawing the line between speed and simplicity/elegance, Enrico Colombini