473,762 Members | 8,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gcc 64bit compiler does not offer any speed advantage

I must say i didn't expect this. I just did some measures on FreeBSD
6.2 with gcc 3.4.6 and there is absolutely no significant difference
between 32 and 64 bit mode - neither in compilation speed, nor in
speed of the compiled result.

As a benchmark i took a bootstrap of the SmallEiffel Compiler (which
has 38 files with around 100 kloc). The times i got were very
reliable. The bootstraping (compile the c files from last eiffel
compiler stage, and then use this to regenerated the eiffel compiler
and all tools) took

32Bit: 2,58 (wall), 2,57 (user), 0,3 (system) = exe size:
1,757,177 byte
64Bit: 2,48 (wall), 2,42 (user) , 0,5 (system) = exe size:
2,179,326 byte
This is a measure of the quality of the generated code

The compilation only
13,9 (32bit) <-16,2 (64 bit) sec -O0
33,5 (32bit) <-31,4 (64 bit) sec -02
55,7 (32bit) <-51,9 (64 bit) sec -03

So the new registers are just not giving any benefits that are not
consumed by the additional memory overhead.

I'm mostly surprised that the code generation part of gcc (speed of
the compiler) is also the same, because this is the most terrible
weakness for any of my development (it has to do with how the eiffel
compiler works). MSVC is 16x faster then (using precompiled headers)
gcc (without precompiled headers). I can't compare them again because
the OS are now on different machines but precompiled headers are
almost useless on gcc - and the way Eiffel generates the header file
is already perfect (only one header per c file, and first statement in
each file). I got results from -8% (gcc 4.x) upto 28% (gcc 3.4.6) .

So i always believed that the problem is the code generator of gcc,
which makes sense because Sun Studio 11 on SPARC is 4x faster per Mhz
then the Intel86 code (because of the easy calling conventions for the
compiler) and the tinycc is 9x faster then gcc. Both aren't using
precompiled headers.

But the additional number of registers seems to not reduce the
complexity of the code generator. I really don't understand this. I
guess it is the one-for-all overengineered architecture that slows
down the whole gnu collection.

Unfortunately the only other useable c compiler on linux i could test
was almost as slow as gcc. Seems that Intel does only care about speed
of the executable.

So is there something useable out there (tinycc is unfortunately full
of bugs and not anymore maintained) that is at least 3-5 times faster
then gcc. It would make my development much easier.

Ah yes, on my iMac PPC i also tried it, codewarrior <-gcc was only
giving a little bit less then 2x performance. But this compiler does
not exist anymore. OpenWatcom is also not developed and the lcc-
linux32/lcc-linux64 seem to be not yet available.

Apr 18 '07
19 3813
llothar wrote:
I don't care (most of the time, at least when i'm using -O0) about the
speed of the compilee,
but the speed of the compiler is very very important for me (because
of problems with
the used eiffel compiler technology). I'm concerned about my most
important resource: time.
If i have a long edit-compile-run cycle it is reducing productivity a
lot.
<OT>Use parallel/distributed building. If your current tools don't
support this, give Sun Studio a try. </OT>

--
Ian Collins.
Apr 18 '07 #11
I'm assuming that you've already tried GCC 4.2, are using -pipe, and are
unable to employ
-pipe is also a myth.

I measured the time with and without -pipe, the effect is absolutely 0
and this makes much sense.
Make magic to cut down on the number of units which need
recompiling each cycle.
This is the problem. It is completely under the control of the Eiffel
compiler

Apr 18 '07 #12
llothar <ll*****@web.de writes:
>I'm assuming that you've already tried GCC 4.2, are using -pipe, and are
unable to employ

-pipe is also a myth.

I measured the time with and without -pipe, the effect is absolutely 0
and this makes much sense.
[snip]

Please don't snip attribution lines.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Apr 18 '07 #13
llothar wrote:
>
>If you use all the performance options pertinant for your hardware
and do profile guided optimization, you can get performace pretty
close to the commercial compilers.

Again, you also don't understand it. Seems to be pretty hard for many
people.

I don't care (most of the time, at least when i'm using -O0) about the
speed of the compilee,
but the speed of the compiler is very very important for me (because
of problems with
the used eiffel compiler technology). I'm concerned about my most
important resource: time.
If i have a long edit-compile-run cycle it is reducing productivity a
lot.

And here gcc is hopeless behind compared to LCC-Win32, MSVC, Borland C
or TinyCC.
Take a look at the line wrapping above. If you limit your lines to
about 72 (67 is better) chars this won't occur.

--
<http://www.cs.auckland .ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfoc us.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews

--
Posted via a free Usenet account from http://www.teranews.com

Apr 19 '07 #14
On Apr 18, 11:00 pm, llothar <llot...@web.de wrote:
If you use all the performance options pertinant for your hardware and
do profile guided optimization, you can get performace pretty close to
the commercial compilers.

Again, you also don't understand it. Seems to be pretty hard for many
people.

I don't care (most of the time, at least when i'm using -O0) about the
speed of the compilee,
but the speed of the compiler is very very important for me (because
of problems with
the used eiffel compiler technology). I'm concerned about my most
important resource: time.
If i have a long edit-compile-run cycle it is reducing productivity a
lot.
You can get productive in this long cycle by optimizing and
contributing patches for gcc :-)
Apr 19 '07 #15
You can get productive in this long cycle by optimizing and
contributing patches for gcc :-)
No you can't contribute patches if the whole system is the problem.
You need a revolution and in computer science this means another
program.

But i don't want to contribute, i want put some money somewhere and
get a good and fast c compiler.

Apr 19 '07 #16
On Thu, 19 Apr 2007 10:21:00 +1200, in comp.lang.c , Ian Collins
<ia******@hotma il.comwrote:
>llothar wrote:
>I don't care (most of the time, at least when i'm using -O0) about the
speed of the compilee,
but the speed of the compiler is very very important for me (because
of problems with
the used eiffel compiler technology). I'm concerned about my most
important resource: time.
If i have a long edit-compile-run cycle it is reducing productivity a
lot.
<OT>Use parallel/distributed building. If your current tools don't
support this, give Sun Studio a try.
You can do this with gcc too - check out the -j switch to make, and
consider using a more sophisticated build environment which can
distribute jobs over multiple machines. ISTR there are some
python-based tools which assist with this.

</OT>
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Apr 19 '07 #17
On 19 Apr 2007 10:05:21 -0700, in comp.lang.c , llothar
<ll*****@web.de wrote:
>But i don't want to contribute, i want put some money somewhere and
get a good and fast c compiler.
Then feel free to do so, but please don't waste our time here by
complaining about an offtopic toolset for no apparent reason.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Apr 19 '07 #18
llothar <ll*****@web.de wrote:
You can get productive in this long cycle by optimizing and
contributing patches for gcc :-)

No you can't contribute patches if the whole system is the problem.
You need a revolution and in computer science this means another
program.

But i don't want to contribute, i want put some money somewhere and
get a good and fast c compiler.
Then stop using, and more importantly stop whingeing about, Ganuck.

Richard
Apr 20 '07 #19
llothar wrote:
>If you use all the performance options pertinant for your hardware and
do profile guided optimization, you can get performace pretty close to
the commercial compilers.

Again, you also don't understand it. Seems to be pretty hard for many
people.

I don't care (most of the time, at least when i'm using -O0) about the
speed of the compilee,
but the speed of the compiler is very very important for me (because
of problems with
the used eiffel compiler technology). I'm concerned about my most
important resource: time.
If i have a long edit-compile-run cycle it is reducing productivity a
lot.

And here gcc is hopeless behind compared to LCC-Win32, MSVC, Borland C
or TinyCC.
Please don't compare GCC with TinyCC. GCC attempts to conform to the
standard; whereas TinyCC doesn't do a whole bunch of things remotely
correctly, such as supporting trigraphs, handling whitespace
correctly and expanding simple macros properly. Fixing what TinyCC
doesn't do right will necessarily slow it down a lot.

Despte that I do agree GCC is unjustifiably slow.
Apr 21 '07 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
2581
by: Bryan Parkoff | last post by:
You may notice that switch (...) is much faster than function that can gain a big improved performance because it only use JMP instruction however function is required to use CALL, PUSH, and POP instruction that can be slower. I created three functions in an array. Array is called pArray_Func(). pArray_Func() contains three functions. "xx" can be used to point each function. Let say, I have over 1,000 functions. I would put "inline"...
8
5659
by: Nathan Waddington | last post by:
Hello Everyone, My program receives a string representation of a 64bit hex number that needs to be displayed as the decimal number it represents. The compiler that is being used is Dynamic C and (alas) it does not support 64bit numbers. So far i have been able to take the least significant 4 bytes and convert them correctly, but when i try to take the most significant 4 bytes i am unable to convert them correctly. Below are the 3...
10
2352
by: Henrik Andersen | last post by:
Hi newsgroup Does the c++ compiler generate faster code at execution time than the C# compiler? Does the c++ compiler have more optimisations than the C# compiler? Thanks in advance!
5
3032
by: shobhah | last post by:
Hi, We have a complete succsssfully working product on 32bit sparc solaris machine for which compiler used is CC 5.8 Now we are migarting our product from 32 bit to 64bit sparc solaris machine. While porting we need 64 bit compiler issues for our application product which is wriiten in completely C++. We tried with -xarch=v9 and -xport64=full compiler options to find out 64bit porting problems. But we did not find any issues for our...
31
2798
by: Mark Dufour | last post by:
Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed Python programs into optimized C++, and hence, highly optimized machine language. Besides many bug fixes and optimizations, these releases add the following changes: -support for 'bisect', 'collections.deque' and 'string.maketrans'
1
1969
by: GaryDean | last post by:
We have been developing all of our .net applications on 32 bit windows using 32 bit SQL Server. We are being asked to now deploy to servers running 64bit windows and 64bit SQL Server. Are there issues? Differences? Should we switch our dev environment to 64bit. What is the advantage of going with 64 bit servers other than being able to address more memory? Thanks, Gary
18
3930
by: cman | last post by:
Hi guys, why does this fail raising bad_alloc int *v = new int ; if this succeeds int *v = (int *) malloc((unsigned)6000000000) both on the same machine, same compiler g++, 64bit linux red hat enterprise 4, no ulimits on the user, enough virtual memory ecc... in both cases compiled with
4
3297
by: legrape | last post by:
I am porting a piece of C code to 64bit on Linux. I am using 64bit integers. It is a floating point intensive code and when I compile (gcc) on 64 bit machine, I don't see any runtime improvement when optimizing -O3. If I construct a small program I can get significant (>4x) speed improvement using -O3 versus -g. If I compile on a 32 bit machine, it runs 5x faster on the 64 bit machine than does the 64bit compiled code. It seems like...
2
3529
by: not_a_commie | last post by:
I've been using INPUT as declared below. However, I get warnings about this being incompatible with a 64bit OS. I have no 64bit OS to test on. However, is it true that the union in the INPUT declaration below would need to line on an 8byte boundary for a 64bit OS? And should I just do this with #if? #if 64bitosblah FieldOffset(8) #else FieldOffset(4)? public static extern uint SendInput(uint nInputs, INPUT pInputs, int cbSize);
0
9378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5268
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3914
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.