I was wondering if anyone could calculate which is faster:

55≥RandInt(1,100
-or-
.55≥rand
Please use this code to figure out which one is faster:

Code:
:startTmr→T
:For(n,1,[number]
: <command(s) to be tested>
:End
:checkTmr(T)/[number]


*taken from TI-Basic Developer
2000 repetitions, tested on 84+ce,

26 sec for 55≥RandInt(1,100

22 sec for .55≥rand

.55≥rand is also 5 bytes smaller.
10,000 repetitions, tested on 84+SE,

.0182s/rep for 55≥randInt(1,100

.0163s/rep for .55≥rand

11% speed difference.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement