BBC BASIC for Windows
IDE and Compiler >> Compiler >> REM!Fast benchmark results
http://bb4w.conforums.com/index.cgi?board=compiler&action=display&num=1431774127

REM!Fast benchmark results
Post by rtr2 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