Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:28 07 May 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Is INC VAR now slower than VAR=VAR+1 with Tracecache?

Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1880
Posted: 10:04am 07 May 2026
Copy link to clipboard 
Print this post

OPTION EXPLICIT
OPTION DEFAULT NONE
Option Tracecache on 128
dim x as float
dim i as integer
x=1000000
timer = 0
do
 x=x/1.0001
 i=i+1
loop while x>1

print timer


In my case, this is 10ms faster than:

OPTION EXPLICIT
OPTION DEFAULT NONE
Option Tracecache on 128
dim x as float
dim i as integer
x=1000000
timer = 0
do
 x=x/1.0001
 inc i
loop while x>1

print timer
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026