From: "Joseph J. Strout" <[EMAIL PROTECTED]>
Date: Wed, 15 Feb 2006 16:29:20 -0700
At 1:48 PM -0800 2/15/06, Daniel L. Taylor wrote:
I must confess that I don't understand why certain things are sooo
much
faster in C than in RB. C will clobber RB in a simple loop even
with all the
Pragmas. The difference is huge!
That's not true, in general. A while back we took a simple but
non-contrived Mandlebrot generator, and wrote it in both C and
REALbasic using the same algorithm. The RB code was slightly faster
than the unoptimized C code, and slightly slower than the C code with
optimizations on.
Yes it is true, in general.
Perhaps your C coders aren't that great? I'll bet you I could write a
mandelbrot in C faster than the one your team wrote, if only because
I've seen mandelbrots written in C way faster than yours. If others
can do it, so can I.
RB's string operations are also, in many cases, faster than what
you'd probably have in C for the same functionality, unless you went
to a lot of work -- there is a lot of sophisticated code behind them
(especially in making them encoding-savvy).
I've gone to a lot of work, using my ElfData plugin.
Besides, what you say is once again not true. The fact that you don't
have raw pointer access to strings slows all sorts of things down.
If you are trying to just get access to an arbitrary byte from the
string, I'm guessing you'll need to spend 100 cycles doing you could
do with one cycle, had you written it in C with pointers.
--
http://elfdata.com/plugin/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>