Re: Function calling
Re: Function calling
- Subject: Re: Function calling
- From: "Theodore H. Smith" <email@hidden>
- Date: Thu, 26 May 2005 02:26:31 +0100
Of course strongly typed languages can be much faster. Think about it.
MyClass* OtherClass::MyFunc() {
return &this->MyClassField;
}
void MyClass::Increment() {
this->Value++;
}
OtherClass Fred;
for (long i = 0; i < 10000000; i++) {
Fred.MyFunc->Increment();
}
A good C++ compiler will compile this with no functions called! It will
be all tight ASM code. Not that gcc is a good compiler, though. I think
MrCpp (from MPW) could handle these kind of cool opts. But gcc I'm not
so sure if it can do it on C.
As for Obj-C, these kind of opts are often impossible, because Obj-C is
weakly typed.
--
elfdata.com/plugin/ Industrial strength string processing, made easy.
"All things are logical. Putting free-will in the slot for premises in
a logical system, makes all of life both understandable, and free."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden