Jump to content

Photo

Benchmarking Languages


61 replies to this topic

#51 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 828 posts
  • Location:Lansing, NY, USA

Posted Tue Jan 26, 2016 6:48 AM

I just realized, even though I've written it many times, that it's "Senior Falcon", and I have always read it to myself as "Señor Falcon"... ;)

The "Senior Falcon" by Carl Goldberg Models was my favorite radio control airplane back in the day.  You might say it is my "Rosebud".  (See the movie "Citizen Kane" if you don't understand the reference.)



#52 Retrospect OFFLINE  

Retrospect

    Dragonstomper

  • 865 posts
  • Location:Wakefield, England

Posted Tue Jan 26, 2016 8:10 AM

:|

Sorry about any barriers. The statement can easily be taken out of context and doesn't stand on its own. Hope my English isn't gibberish and/or my wording come on as too strong.

:)

I know you said before, English isn't your native language...... I always thought your native language was Extended Basic.  :P



#53 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,806 posts
  • Location:Denmark

Posted Tue Jan 26, 2016 8:53 AM

I know you said before, English isn't your native language...... I always thought your native language was Extended Basic.   :P

 
Yep. The strange dialect of Basic that I've picked up is only spoken at special occasions during the night in the Australian jungles. But only sometimes.  :music:



#54 Tursi OFFLINE  

Tursi

    River Patroller

  • Topic Starter
  • 4,597 posts
  • Location:BUR

Posted Tue Jan 26, 2016 12:27 PM

Thus... Sometimes99er? ;)

No worries, we're all just chatting. :)

#55 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,215 posts

Posted Tue Jan 26, 2016 9:35 PM

FWIW, the PCODE engine UCSD Pascal uses is basically a stack based CPU.  There are no registers so on top of being interpreted, all variable accesses are through stack relative addressing on the P-Machine.  If I remember right, the Apple version is somewhere between 30% to 50% faster than Applesoft depending on what you are doing.  That's similar to Applesoft BASIC compilers.



#56 Willsy OFFLINE  

Willsy

    River Patroller

  • 2,951 posts
  • Location:Uzbekistan (no, really!)

Posted Wed Jan 27, 2016 1:35 AM

FWIW, the PCODE engine UCSD Pascal uses is basically a stack based CPU.  There are no registers so on top of being interpreted, all variable accesses are through stack relative addressing on the P-Machine.  If I remember right, the Apple version is somewhere between 30% to 50% faster than Applesoft depending on what you are doing.  That's similar to Applesoft BASIC compilers.


So in the TI's case, pascal is running on a virtual stack based cpu coded in GPL which is a software based virtual CPU running on the 9900, a 3mhz CPU!

#57 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,593 posts
  • Location:Eagan, MN, USA

Posted Wed Jan 27, 2016 10:03 AM

I guess that explains the benchmark results :)

#58 mizapf OFFLINE  

mizapf

    River Patroller

  • 2,308 posts
  • Location:Germany

Posted Wed Jan 27, 2016 10:17 AM

So in the TI's case, pascal is running on a virtual stack based cpu coded in GPL which is a software based virtual CPU running on the 9900, a 3mhz CPU!

 

And when all this is running on an emulator, which in turn runs in a virtual machine ...

 

What about writing a scripting engine in UCSD Pascal? ;)



#59 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,215 posts

Posted Wed Jan 27, 2016 3:54 PM

UCSD Pascal really wasn't designed to work well on microcomputers.  It was originally designed as a common environment for students using mini-computers.
You have a 16 bit instruction set, stack based data (no registers), a compiler with no significant optimization, and it's supposed to have 64K of RAM available.
The 9900 could interpret the PCode alright, but the TI-99/4A will have a lot of waitstates you wouldn't have if the VM used a register based processor.  
I'm sure a native 9900 PMachine would be in the speed range of Forth interpreters measured in the benchmarks.

Just for comparison, the 6809 has a compiler for OS-9 that uses something like PCode they refer to as ICode.
BASIC-09 is sort of a cross between BASIC and Pascal in syntax, and even though it is interpreted like PCode, it runs about 90% faster than Extended Color BASIC.
That's much better than Apple Pascal vs Applesoft, and Apple Pascal is optimized more than most versions of UCSD Pascal.
Both Extended Color BASIC and Applesoft are Microsoft BASIC interpreters so the speed comparison should be somewhat accurate.
BASIC-09 also completed the Ahl benchmark in under 10 seconds if I remember right.

FWIW, the 6809 is one of the few microprocessors from the 70s that didn't get a version of UCSD Pascal even though it was more capable of running it due to 16 bit support, a separate user stack pointer, and stack relative addressing. 
 



#60 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 3,970 posts

Posted Wed Jan 27, 2016 6:21 PM

Actually, according to this article--there was a version of the USCD Pascal interpreter for the 6809 available in 1979. . .and it even lists the coorporate contact data for the company that wrote it.



#61 JamesD OFFLINE  

JamesD

    Quadrunner

  • 7,215 posts

Posted Thu Jan 28, 2016 12:38 AM

Actually, according to this article--there was a version of the USCD Pascal interpreter for the 6809 available in 1979. . .and it even lists the coorporate contact data for the company that wrote it.

Interesting, I knew there was a 6800 version but not a 6809 version.
There's even a review in 68 Micro Journal.  

I guess I only looked for a disk image.



#62 TheBF OFFLINE  

TheBF

    Chopper Commander

  • 164 posts
  • Location:The Great White North

Posted Mon May 8, 2017 1:01 PM

I just found this thread and I just got TI-Forth's sprite words ported to CAMEL99,

so I thought I would add 1 more language dialect.

 

CAMEL99 Forth uses an optimization in the architecture in that it caches the top of the Forth

parameter stack in Register 4.  This provides a speedup on some operations and makes more overhead

for others. Net net it's about 8..10% faster.

 

I just took Willy's code and made some word changes for my dialect.

 

The optimization is similar to Lee's in that I optimized VC! (VDP character store)

to remove the sub-routine call and renamed it VSBW.

And I used 1-! , which decrements a variable by 1 on the loop counter.

 

The GCC results are really impressive but so should they be after 20 years of improvements to that compiler.

After the AI bots start writing code, I guess we will all be out of work.

VARIABLE CNT

: ASTERISK  0028 107C 1028 0000 12A CHARDEF ;

HEX 300 CONSTANT $300
$300 1+ CONSTANT $301

DECIMAL 
: TEST
      GRAPHICS
      PAGE
      1 MAGNIFY
      ASTERISK
      0 0 0 42 1 SPRITE
      100 CNT !
      BEGIN
           CNT @ 0> WHILE
           239 0 DO   I $301 VC!     LOOP
           175 0 DO   I $300 VC!     LOOP
           0 239 DO   I $301 VC! -1 +LOOP
           0 175 DO   I $300 VC! -1 +LOOP
           -1 CNT +!
      REPEAT
;  ( 30 seconds)

( Optimized with VSBW and 1-! operators)
: TEST-OPT
      GRAPHICS
      PAGE
      1 MAGNIFY
      ASTERISK
      0 0 0 42 1 SPRITE
      100 CNT !
      BEGIN
           CNT @ 0> WHILE
           239 0 DO   I $301 VSBW     LOOP
           175 0 DO   I $300 VSBW     LOOP
           0 239 DO   I $301 VSBW  -1 +LOOP
           0 175 DO   I $300 VSBW  -1 +LOOP
           CNT 1-!
      REPEAT
;  ( 28.5 seconds)


All these Indirect threaded Forths are speed limited by the address interpretor, so they will not go much faster.


Edited by TheBF, Mon May 8, 2017 1:18 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users