Re: speed daemons
Re: speed daemons
- Subject: Re: speed daemons
- From: Ondra Cada <email@hidden>
- Date: Thu, 30 Aug 2001 11:15:04 +0200
Chilton,
>
>>>>> Chilton Webb (CW) wrote at Wed, 29 Aug 2001 23:26:28 -0500:
CW> I'm writing a server. Currently it's all in C, and uses sockets to talk
CW> to the client, (which is also a custom app). No performance problems
CW> that I can see, but soon we'll be taking on large numbers of clients
CW> (thousands).
CW>
CW> So I wonder, would using an OOP language like Obj-C for this be
CW> detrimental at all to performance, or does it all compile down to
CW> similar code?
Well, it all depends. Generally a higher-level tool eats some performance
_IF_ algorithms are same. OTOH,
(i) high-level tools tend to allow you to select better algorithms;
(ii) the underlying libraries can be optimalized much better than your plain
C equivalents (NSDictionary would probably be faster than anything you rig
in C, since you would hardly have time enough to optimalize thing used in
just one program so much).
Can't tell for an unknown application, but generally
- C code does not differ, of course (ObjC is just an extension of C);
- message dispatching tends to be 2-3 times slower than function call;
- complete algorithms tend to be faster in ObjC/Cocoa than in C, unless you
took _real_ pains to optimalize the C variant (thanks to the power and
effectivity of Foundation, mainly).
CW> Second question, can an app written in Cocoa be launched via the shell?
Yeah, "Appname.app/Contents/MacOS/Appname &". It's an aboslutely normal executable.
CW> Via a telnet session?
Yep, but alas the NSHost feature was trashed :((((((((((((
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc