Re: The bug where terminal and xcode ran "different"
Re: The bug where terminal and xcode ran "different"
- Subject: Re: The bug where terminal and xcode ran "different"
- From: Jeffrey Oleander <email@hidden>
- Date: Sun, 11 Feb 2007 13:07:20 -0800 (PST)
> "Theodore H. Smith" <email@hidden> wrote:
>> On 2007-02-11, at 18:51, Paul Walmsley wrote:
>> Don't underestimate though the performance improvements
>> you can get from writing good STL code... 'the guy
>> who wrote the optimiser is probably smarter than you'
:-)
> I'll agree he is "probably" smarter for most people.
>
> My first entry into PPC ASM, I found out how to write
> a "byte scan loop" in 3 instructions. (That's where you
> find the first byte in a string that matches a search
> byte). CodeWarrior would generate this loop in 8
> instructions. And MrCpp would generate one with
> 4 instructions.
>
> Mine ran over 2x faster than the CodeWarrior one, and
> faster than the MrCpp loop also.
A friend of mine once showed me how to get a certain tight
loop on a Trash-80, and how you mustn't let it run for long
because it would over-heat the memory chips from banging on
that one small area repeatedly, and actually produce the
kind of melt-down depicted in SF flicks.
> If all these smart guys can get the most simplest of
> things wrong...
But they did not "get them wrong". They have a slightly
different aim: to have the compiler generate efficient code
in MOST cases, while allowing the individual developer to
optimize her particular tasks.
A game we used to play was to have the compiler generate a
file with the assembly language instructions and symbols,
then optimize that... or, occasionally, reject that
completely and re-write it in optimized assembly language.
I remember teaching one of the profs how to do this, and
how to read the cross-reference tables and load maps, and
the gleam in his eyes. He started teaching it in his
classes that same semester, alongside structured
programming and such.
But that's only rarely called for, or even the wise thing
to do, because it invariably creates maintenance
head-aches.
The compiler makers have to do optimizations that will work
in most situations, but may not be optimal for every
particular task, and, at the same time, will let you work
in a less error-prone language (fewer errors for the amount
of work the object code does on a functional basis).
So, anyway, what was the up-shot of the original question?
Were all of the same gcc command-line switches set the same
way? Were all of the same environment variables there with
the same values? Were the .plists the same? Were the same
libraries linked in the same way?
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden