RunRev vs RealBasic (Richard Gaskin)

Richard Gaskin ambassador at fourthworld.com
Thu Jan 20 18:09:37 EST 2005


David Grogono wrote:
 > Richard Gaskin wrote:
 >
 >> We had a rather funny thread here last year in which an RB
 >> fan started a bake-off for speed on a parsing algorithm on
 >> a fairly large file.  True 'nuff, RB was faster -- but only
 >> by 3 milliseconds. And that was the overal score -- in the
 >> most common task, loading a file, Rev was nearly twice as fast.
 >
 > A number of small clarifications on this.  The person who started
 > the speed comparison was not an "RB fan" but rather a SuperCard
 > user evaluating both REALbasic and Revolution.

Having once been the leading vendor of third-party components for 
SuperCard, I've known him for more than a decade.  Somewhere in the 
communications he mentioned that he'd felt so burned by the Allegiant 
experience that he was resistent to working with xTalks in general, and 
accordingly had a preference for RB.


 > His initial attempt found that REALbasic was significantly faster than
 > Revolution.

That was the second round.  The first round had Rev way in the lead 
(twice as fast IIRC), using nothing more than a half-dozen lines of code 
found in an old MetaCard example stack.


 > After both sets of code were further optimized the speed differences
 > were negligible.  The primary difference after optimization is the
 > readability and maintainability of the code.  The guts of the routine
 > in REALbasic is 6 lines of code but 37 lines of code in Revolution.

We could selectively compare subsets, but to get the job done the final 
published code listings have 74 lines for RB and 79 lines for Rev.


 > As for the speed of the load, the results are probably misleading
 > for REALbasic because it includes the first step of string processing.

It's odd that after so many RB'ers helped with that code they came up 
with an inefficient method.

But maybe it's not so bad -- his Rev code uses:

    put url ("file:"&fn) into tMatchList

That also does string processing, changing any line endings to match the 
Unix convention used internally within the engine.  "binfile" is often 
faster than "file", since it loads the file wholesale without modifying 
line endings.


 > Either way the load is extremely fast in both environments and
 > it's a tiny tiny fraction of the total task.  Here's the code for each
 > environment:  copied from <http://www.yav.com/speed.html>

 From that page:
	
                 RealBasic (5.5.1)   Revolution (2.2)

Load Data           28 ms                   14 ms
	
Check Matches     1036 ms                 1049 ms

Display All        184 ms                  188 ms
	
TOTAL            1248 ms (78 ticks) 	  1251 ms (78 ticks)


What's interesting here is not RB vs. Rev, but RB vs. C.  One of the 
advantages RB personnel like to tout is that RB is "fully compiled", in 
contrast to what they characterize as Rev being "interpreted" (in truth 
Rev is a bit of both, like Java but with more efficient structure, but 
that's another hair-splitting story).

If RB were indeed "fully compiled", we should expect it to beat the 
pants off of any "interpreted" language by a very wide margin, and have 
speeds more in line with what one would expect from compiling C or 
anything else that outputs machine-specific object code.

That so many common tasks perform with nearly equivalent speed in an 
ultra-high-level language like Transcript speaks rather well for its 
inventor.  And given the many productivity advantages to typeless 
languages outlined by Osterhout and others 
(<http://www.tcl.tk/doc/scripting.html>), Rev makes a very strong case 
for itself that more than compensates for the few specialized cases 
where RB may actually turn out to be significantly faster.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev




More information about the use-livecode mailing list