Re: Speeding up XCode?
Re: Speeding up XCode?
- Subject: Re: Speeding up XCode?
- From: Andreas Grosam <email@hidden>
- Date: Fri, 21 Oct 2005 18:37:13 +0200
On 21.10.2005, at 12:09, Robert Dell wrote:
Jeff Laing wrote:
are you trying to make my code run slower?
Frankly, I don't see where anyone producing code that looks like this:
(from
http://optusnet.dl.sourceforge.net/sourceforge/yasse/yasse-2.2.0.m)
digit = [[mystringvalue substringFromIndex: 0]
substringToIndex: 1];
if ([digit isEqualTo: @"1"])
{
result = result * 10;
result = result + 1;
}
else if ([digit isEqualTo: @"0"])
{
result = result * 10;
};
mystringvalue = [mystringvalue substringFromIndex: 1];
};
gets to blame the compiler for producing sub-optimal runtime. The
amount of
Objective-C overhead thats deliberately introduced here, for now good
reason, is mindboggling.
do you know of any other way i can get a string of say "4n35a" to
return the numeric result of 435 or a string "2.3906" to return the
numeric value of 23906?
there's a reason for this routine. when the system can't handle wht
you need, make it. i'm inputting a string such as " 43 25% learning"
and need the numeric value 4325 from that and ignore the rest.
If your input can be described through a grammar, you may consider to
use a parser. I wouldn't use lex, bison, yacc or ANTLR, but some more
light-wight solutions. Or create your own parser, possibly a regex
solution is sufficient.
Regards
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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