Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make your code faster
#6
I think I got it working. Very odd - the compiler seems to over write itself.

I wrote up that basic equivalent program, and it ran with tobos compiler in 22,448 frames. It was 10 times faster than Sinclair Basic. If all the numbers it held were floating point numbers... wow. That's VERY impressive.


Code:
Sinclair basic:      235,726 Frames
Tobos compiler:       22,448 Frames
Hisoft Compiler
  All Floating Point: 75,059 Frames
  All uInteger:      30,646 Frames.

What this shows is that clearly Boriel's compiler is far and away better than tools we had on the spectrum in the 80s. It also shows that Tobos was a pretty amazing piece of work - though I think the Hisoft one is more polished. The 128K version only uses 500 bytes of real memory - most of it gets tucked away in the extra memory the 128 has. As a result, it could actually compile a 40K basic program. For its day, that was amazing!

Still, all credit to the guys that wrote Tobos. Right now, with quick tests, it seems to be faster at floating point work than Hisoft is at Integer. That's mind blowing. It's also very tight on runtimes. The hisoft code was about 450 bytes long. The tobos code about 315. That's...incredible. That includes the runtimes it needs? Wow.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)