C/C++ speed optimization bible/resources/pointers needed!

This is a discussion on C/C++ speed optimization bible/resources/pointers needed! within the Other Technologies forums in category; Androcles said: > If you want to find stupidity look no further than right here. Well, you said it, not me. -- Richard Heathfield <http://www.cpax.org.uk> Email: -www. +rjh@ Google users: <http://www.cpax.org.uk/prg/writings/googly.php> "Usenet is a strange place" - dmr 29 July 1999...

Go Back   Application Development Forum > Other Technologies

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #111  
Old 07-28-2007, 11:28 AM
Richard Heathfield
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Androcles said:

> If you want to find stupidity look no further than right here.


Well, you said it, not me.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Reply With Quote
  #112  
Old 07-28-2007, 12:40 PM
Randy Yates
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

"Dr Ivan D. Reid" <Ivan.Reid@brunel.ac.uk> writes:

> On 28 Jul 2007 11:13:30 +0300, Phil Carmody <thefatphil_demunged@yahoo.co.uk>
> wrote in <87tzrp0wut.fsf@nonospaz.fatphil.org>:
>> "Dr Ivan D. Reid" <Ivan.Reid@brunel.ac.uk> writes:
>>> On Fri, 27 Jul 2007 04:44:59 GMT, jimp@specsol.spam.sux.com
>>> <jimp@specsol.spam.sux.com>
>>> wrote in <1d9on4-6ta.ln1@mail.specsol.com>:

>
>>> > Linux will be a LOT faster than Windows when doing number crunching.

>
>>> Really? I have two "identical" CPUs running seti@home. The one
>>> running Linux currently has 860 Cobblestones of Recently Acquired Credit.
>>> The one running Win XP has a 16% higher RAC:

>
>> Were they compiled from the same source with the same compiler,
>> and same options?

>
> They are both "optimised" versions from lunatic.at; I believe they
> both used the Intel compiler, but I'm not totally sure about the Windows
> version.


Then we're not sure that we're comparing apples to apples and all bets
are off.
--
% Randy Yates % "She has an IQ of 1001, she has a jumpsuit
%% Fuquay-Varina, NC % on, and she's also a telephone."
%%% 919-577-9882 %
%%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO
http://home.earthlink.net/~yatescr
Reply With Quote
  #113  
Old 07-28-2007, 01:14 PM
Luna Moon
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!


"Les" <l.neilson@nospam.acecad.co.uk> wrote in message
news:f8cu5o$2d1s$1@newsreader.cw.net...
>
> "Luna Moon" <lunamoonmoon@gmail.com> wrote in message
> news:f8clk4$n0$1@news.Stanford.EDU...
>>

>
> <snip>
>
>> As I said, I am confined to what I have. Let's focus on coding good
>> C++...
>>

>
> Then why are you posting to comp.lang.fortran ? :-)
>


Because I've heard for many numerical computations, Fortran is faster than
C++.

I generate my code from Maple from a very complicated mathematical formulae.

Maple has the options to allow me to choose whether to export to Fortran or
to C.

I was weighing about these choices...


Reply With Quote
  #114  
Old 07-28-2007, 01:19 PM
glen herrmannsfeldt
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Michael Moroney wrote:

> glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
>>jimp@specsol.spam.sux.com wrote:
>>(snip)
>>>>30 days? That's nothing. I work with VMS systems, which frequently have
>>>>uptimes measured in years, as long as the electric utility, thunderstorms
>>>>and UPS's cooperate.


>>>You got TOPS-10 and RT-11 too?


>>Isn't TOPS-10 the one with the error message up-too-long?


> I don't know of that, but a long time ago they had to make a change in
> the format of the "Uptime" format on VMS. A company using VMS complained
> that 3 digits for the "Days" field wasn't enough, it was printing stars.


It seems it is TOPS-20 with UP2LNG

http://neil.franklin.ch/Usenet/alt.s...Mathom_XKL_COM

The explanations seems to be that it counts milliseconds in a
signed 36 bit word, and UP2LNG happens when it overflows.

That would be about 397 days.

-- glen

Reply With Quote
  #115  
Old 07-28-2007, 01:40 PM
Peter K.
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Steve Underwood <steveu@dis.org> writes:

> A lot of people have quite poor uptime experiences with Stratus. While
> the hardware protection is very effective, their OS used to be pretty
> flaky (don't know about these days) and their reboot times could be
> over an hour. We had cheap Compaq servers beating them hands down for
> uptime in some telecoms applications.


Interesting! I've heard from others where the uptime is much longer
than normal.

Any idea what the problem was?

Ciao,

Peter K.

--
"And he sees the vision splendid
of the sunlit plains extended
And at night the wondrous glory of the everlasting stars."


Reply With Quote
  #116  
Old 07-28-2007, 01:55 PM
jimp@specsol.spam.sux.com
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

In sci.physics Luna Moon <lunamoonmoon@gmail.com> wrote:

> "Les" <l.neilson@nospam.acecad.co.uk> wrote in message
> news:f8cu5o$2d1s$1@newsreader.cw.net...
> >
> > "Luna Moon" <lunamoonmoon@gmail.com> wrote in message
> > news:f8clk4$n0$1@news.Stanford.EDU...
> >>

> >
> > <snip>
> >
> >> As I said, I am confined to what I have. Let's focus on coding good
> >> C++...
> >>

> >
> > Then why are you posting to comp.lang.fortran ? :-)
> >


> Because I've heard for many numerical computations, Fortran is faster than
> C++.


> I generate my code from Maple from a very complicated mathematical formulae.


> Maple has the options to allow me to choose whether to export to Fortran or
> to C.


> I was weighing about these choices...


Wouldn't it be a lot simpler to just do both once, see which is fastest,
then use that from then on rather than speculating how many angels
can dance on the head of a pin?

--
Jim Pennino

Remove .spam.sux to reply.
Reply With Quote
  #117  
Old 07-28-2007, 02:51 PM
Jerry Avins
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Wade Ward wrote:
> "Jerry Avins" <jya@ieee.org> wrote in message
> news:YqOdneYMtYNBLzfbnZ2dnUVZ_vzinZ2d@rcn.net...
>> Walter Banks wrote:

>
>> Since ISO/IEC 18037 provides for assembly code, that's a tautology. What's
>> the ISO/IEC 18037 instruction for MAC?

> Will you elaborate?


Sure, but why? When a compiler provides for including the programmer's
assembly code in the object code, how can an assembler be faster?

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #118  
Old 07-28-2007, 02:59 PM
Jerry Avins
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Phil Carmody wrote:
> Jerry Avins <jya@ieee.org> writes:
>> What's the ISO/IEC 18037 instruction for MAC?

>
> There isn't an "instruction", nor need there be, given that
> the language doesn't consist of "instructions".
>
> However, there's an example of a MAC in that standard.
> Are you too blinkered to see it?


Blinkered? I haven't read the standard. When I needed to program MACs
and zero-overhead loops using a C compiler, I wrote assembler macros and
used them from C. As I wrote elsewhere, C is not my primary language. (I
can use the same general approach with Forth.)

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #119  
Old 07-28-2007, 03:08 PM
glen herrmannsfeldt
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

Luna Moon wrote:

(snip)

> Because I've heard for many numerical computations,
> Fortran is faster than C++.


> I generate my code from Maple from a very complicated
> mathematical formulae.


> Maple has the options to allow me to choose whether to
>export to Fortran or to C.


C++ isn't C, thought maybe that is obvious.

Object oriented programming can be slower if you do a lot of
object creation/destruction, as memory allocation can be slow.

Note that Fortran now has object oriented features, and
you can write non-OO code in C++.

If you keep object creation out of the inner loops of numerical
computation it should be fast enough, though.

-- glen

Reply With Quote
  #120  
Old 07-28-2007, 04:07 PM
Peter J. Holzer
Guest
 
Default Re: C/C++ speed optimization bible/resources/pointers needed!

["Followup-To:" header set to comp.programming.]
On 2007-07-28 14:55, jimp@specsol.spam.sux.com <jimp@specsol.spam.sux.com> wrote:
> In sci.physics Michael Moroney <moroney@world.std.spaamtrap.com> wrote:
>> Unlike TOPS-10 and RT-11, VMS is still actively being developed, runs on
>> Intel Itanium processors and is at version V8.3-1. It is no longer the
>> general purpose system you may remember it as, but is used in niche
>> applications, particularly "you bet your business on your data"
>> applications like the financial sector.

>
> Is this based on that DEC version on Unix DEC started pushing just before
> they got bought up?


No. VMS is quite a different beast than Unix.

hp


--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:21 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.