Yeah he wants speed.
Yeah, I need Speed too.
Jonathan_Pezzino wrote:
Yeah, I need Speed too.

Don't mind if I do! Wink
Don't we all.
Oh man, the headaches I get without my speed...withdrawal is a bitch.
Don't worry, someone will invent a patch for that too.
It's called detox, dude.
If you program it well, just hype the "slow-mo" features. That should fool them.
birdmanx35 wrote:
If you program it well, just hype the "slow-mo" features. That should fool them.


Haha, yes! I shall use that with ALL of my basic programs!

I made a program that finds all of the factors of numbers. If you enter a really big number, it takes over a minute to tell you that the last factor is 1...
You want speed? Get rid of the Lbl/Goto... Replace with While variable]=1 and End statements. You can change [variable]'s values to work like a goto/lbl system. Smile

Since you are not using 0->[i]var
in the engine, just Delvar, you shouldn't see anything drastic in speed loss of loading.

Change your If K to:


If K=105:Return
A-(2(K=25))-(2(K=34))->N (If the char goes opposite ways, merely swap 34 and 25)
B-(2(K=24))-(2(K=26))->O


That should speed you up a lil...
Foamy: I Assume that the extra lines are for clarity while composing, correct? If not, they are extraneous.
@Birdman: lol
To TI-Freak8x: Thanks, that makes sense. I'll go try that out and post some results.

Kerm: By extra lines, do you mean
:gfkjh
:gfjhds
:
:
:gfjdh
?

If so, then the :'s are just from extra spacing or deleting stuff. Do those slow down my program, too?
I don't think so, since they are merely blank lines. BASIC is slow because it takes the command token, and has to "translate" the commands. If there is nothing to translate, then it shouldn't slow you down at all...

I would really like to know what kind of speed increase/decrease you got out of my suggestion...
foamy3 wrote:
To TI-Freak8x: Thanks, that makes sense. I'll go try that out and post some results.

Kerm: By extra lines, do you mean
:gfkjh
:gfjhds
:
:
:gfjdh
?

If so, then the :'s are just from extra spacing or deleting stuff. Do those slow down my program, too?

Extra lines will slow your program down, but they're nice when you're programming. Use then when you're writing the game, then delete them in the release.
They also take up one extra byte each.
Wow, I took Ti-Freak8x's suggestions and also deleted the blank lines. It really significantly sped up the program. Thanks, guys!
TI-Freak8x's suggestion? Shock Just Joking
Excellent! Smile
foamy3 wrote:
birdmanx35 wrote:
If you program it well, just hype the "slow-mo" features. That should fool them.


Haha, yes! I shall use that with ALL of my basic programs!

I made a program that finds all of the factors of numbers. If you enter a really big number, it takes over a minute to tell you that the last factor is 1...


You should be able to make a prime-factorization much faster through creative use of log( and a binary search strategy.
if you want every factor though, brute forcing is the way.
elfprince13 wrote:
foamy3 wrote:
I made a program that finds all of the factors of numbers. If you enter a really big number, it takes over a minute to tell you that the last factor is 1...


You should be able to make a prime-factorization much faster through creative use of log( and a binary search strategy.
if you want every factor though, brute forcing is the way.


i've made both a prime factor and just factor search programs, neither were all that slow. Biggest speed improvement comes when bruteforcing to first take the square root of the number the user enters, and set that as its largest factor value.
I recently wrote a Java program to bruteforce the value of a squareroot without using any built in functions Very Happy
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6  Next
» View previous topic :: View next topic  
Page 2 of 6
» All times are UTC - 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