openbsd-misc
[Top] [All Lists]

Speed optimization of a C program

To: misc@openbsd.org
Subject: Speed optimization of a C program
From: Stoyan Genov <sdg@rila.bg>
Date: Thu, 28 Feb 2002 17:39:35 +0200
Reply-to: sdg@rila.bg
Sender: owner-misc@openbsd.org
Hi, misc,

On an obsd3.0/i386, I have to run a program which makes lots of
calculations and sorting (actually, trigonometric functions and qsort).

The program is coded in C.

I have two questions:
1) Will there be a speed benefit from statically building the executable
(apart from the ignorable tradeoff from the shared libraries loading)?
2) Apart from optimizing my code (which I think I have done to a
reasonable extend), is my only option for speeding up things recompiling
libc and libm with -O6 (or getting hands on some 2G processor :-)) ?

Thank you for your time.

Regards,
Stoyan Genov

<Prev in Thread] Current Thread [Next in Thread>