BBC BASIC for Windows
« REM!Fast benchmark results »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:59pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: REM!Fast benchmark results  (Read 415 times)
rtr2
Guest
xx REM!Fast benchmark results
« Thread started on: May 16th, 2015, 11:02am »

Those of you still using BB4W v5.95a are missing out on a valuable feature available only in v6.00a: the REM!Fast compiler directive. This directive principally benefits large programs with thousands of variables, but there can be a worthwhile speed improvement even in a small program.

This is illustrated by the trivial benchmark program below. It compares the timing of a static integer variable (generally the fastest kind of variable) with that of a regular integer variable. Here are the results I get (Intel Core i7 running at about 3 GHz):

EnvironmentStatic integer Ordinary integer
BB4W v6.00a IDE160 cs320 cs
Compiled (no REM!Fast)160 cs290 cs
Compiled with REM!Fast   160 cs160 cs

So the REM!Fast made the ordinary integer variable just as fast as the static variety, and about 80% faster than without the directive.

Richard.

Code:
      REM!Fast number%
      TIME = 0 : FOR I% = 1 TO 5000000 : N% = N%+N%+N%+N%+N%+N%+N%+N%+N%+N% : NEXT : PRINT TIME
      TIME = 0 : FOR I% = 1 TO 5000000 : number% = number%+number%+number%+number%+number%+number%+number%+number%+number%+number% : NEXT : PRINT TIME 
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls