Computer Science Canada Check Turing's speed on YOUR computer |
Author: | copthesaint [ Mon Jan 12, 2009 11:59 am ] | ||
Post subject: | Check Turing's speed on YOUR computer | ||
This a program I made to see how fast turing will run with my different games. This is usefull to see how well turing runs on your computer. The test will take approx. 6 seconds. NOTE: This is without Graphics.
|
Author: | Clayton [ Mon Jan 12, 2009 3:09 pm ] | ||
Post subject: | RE:Check Turing\'s speed on YOUR computer | ||
You're doing it wrong. |
Author: | S_Grimm [ Mon Jan 12, 2009 6:02 pm ] | ||
Post subject: | RE:Check Turing\'s speed on YOUR computer | ||
That would clean it up a lot. my opinon tho. ![]() |
Author: | copthesaint [ Mon Jan 12, 2009 7:43 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
Umm I how is it WRONG? I just made them as int because they didn't need a value yet... NE ways use it if YOU want just thought I would share... |
Author: | michaelp [ Mon Jan 12, 2009 7:59 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
They mean you should be using an array. I think. ![]() |
Author: | Clayton [ Mon Jan 12, 2009 8:03 pm ] | ||||
Post subject: | RE:Check Turing\'s speed on YOUR computer | ||||
Yes, if you notice that you're having alot of:
You should probably be using an array:
|
Author: | andrew. [ Mon Jan 12, 2009 8:50 pm ] |
Post subject: | Re: RE:Check Turing\'s speed on YOUR computer |
copthesaint @ Mon Jan 12, 2009 7:43 pm wrote: Umm I how is it WRONG? I just made them as int because they didn't need a value yet... NE ways use it if YOU want just thought I would share... We're not saying you're wrong, we're just offering suggestions to make your code a bit more readable and also so you get a chance to learn arrays because arrays are pretty important in programming. |
Author: | Parker [ Tue Jan 13, 2009 8:42 am ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
Beside from the arrays the program is actually decent. The school computer I am on runs at about 400000, which is considerably slower than you said yours runs at. |
Author: | ecookman [ Tue Jan 13, 2009 9:01 am ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
wow my computer must rlly fuck with only a loop of about 30000 cool program |
Author: | SNIPERDUDE [ Tue Jan 13, 2009 9:25 am ] |
Post subject: | Re: Check Turing's speed on YOUR computer |
Well then, time to clean my computer... only 22000... ![]() ![]() ![]() Okay, fixed and much better at 332k. Good programme. Useful anyways. |
Author: | Zren [ Tue Jan 13, 2009 12:14 pm ] | ||
Post subject: | Re: Check Turing's speed on YOUR computer | ||
I find that the first reading often ends up 1/10th of the maximum as it allocates the stuff into memory or something. You mention that in the header. Though the more times you run it, it will already be in memory and will start with a higher clock/speed. So you could possibly also use this program to test how the time it takes to load into memory. Max Cycle - First Cycle = Time To Load Into Memory Since I was intrigued, I redid this using an array and changed the procedure to a function. Somehow I'm getting 1 million (compared to 500 000) on average. I'm just wondering how the hell it jumped to twice as fast...? Are arrays that powerful in memory? Or is it the size of the program?
|
Author: | copthesaint [ Tue Jan 13, 2009 3:20 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
yes that is a more effective way of doing the program reason for the increase of speed if mostly because you used a function NOT a procedure Me, I still like my program because I made it ![]() ![]() |
Author: | DemonWasp [ Tue Jan 13, 2009 3:55 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
To respond to Zren, YES arrays can have a huge impact on performance! Here's why: When you declare everything separately, you have the N variables scattered all through memory. Retrieving any one of those variables will load it from system RAM into your CPU's data cache (generally quite small; a few megabytes at most). Then, if you access another variable that happened to be stored nearby in memory, it may be in the cache. Since the cache responds orders of magnitude faster than the main RAM, this gives a considerable speed boost. However, since we allocated each variable separately, it is at best unlikely that variable2 will be in the same set of memory that variable1 was, and so you'll have to go back to RAM every time. When you declare variable as an array, you are guaranteed to know that the array is all contiguous (each element right after the one before it, and right before the one after it). The array can still be found in multiple memory blocks, but maybe only 2 or 3 instead of 100+, depending largely on your system setup. Then, the sequential access of each array element will have a considerably higher rate of cache-hits, which is a tremendous speed boost. I should also mention that a simple linked-list suffers the same problem as single-variables do: their entries may be scattered through RAM, causing access to take a looooong time. This is why lists are often implemented with arrays "behind the scenes" now. Conclusion: Arrays can give a decent speed boost over single variables. Auxiliary conclusion: When writing Turing, Holtsoft could have hidden this improvement by putting all the ints into an array based on the locality and name of the variable. Then the speedup would be negligible, though it would perhaps also remove a little bit of the motivation to use arrays. I don't have Turing (work computer), but I do have Java, so I translated it...even on this relatively tame machine (2.4Ghz P4) I ended up with 14.7 million. It occurs to me that Holtsoft wasn't so concerned with performance. Makes me wish they'd open-source their code, so the language could continue improving - if we're going to be using it to teach students, we kinda owe it to them to improve on that. Edit: Cool program. Further Edits: A call to a function isn't substantially different from a call to a procedure. They both take approximately the same length of time, it's just a question of semantics: does the method logically return a value, or not? That's it - no change in performance. |
Author: | Zren [ Tue Jan 13, 2009 6:30 pm ] |
Post subject: | Re: Check Turing's speed on YOUR computer |
Deamon: Thanks, that's cool to know. I'm amazed that arrays are actually so powerful and not just easier to use. I also decided to finally read up about why not to use procedures. Cop: Sorry for stealing your thunder and going off on a tangent, your program was rather inspiring, the ticker timer for results is an awesome eye candy. |
Author: | copthesaint [ Thu Jan 15, 2009 8:15 am ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
It's fine I don't really care because I know I had The Idead First! ;p Just glad people acually used it |
Author: | ecookman [ Thu Jan 15, 2009 8:18 am ] |
Post subject: | Re: RE:Check Turing\'s speed on YOUR computer |
ecookman @ Tue Jan 13, 2009 9:01 am wrote: wow my computer must rlly fuck with only a loop of about 30000
cool program sorry i meant to say "suck" not the f--- bomb |
Author: | copthesaint [ Thu Jan 15, 2009 8:23 am ] |
Post subject: | Re: Check Turing's speed on YOUR computer |
Well I didn't mean to post so soon again but some one replied before I could Edit... ![]() This is the actual program (User friendly) I used my original program to find time (not zrens because It's not my code) try this out! |
Author: | Parker [ Thu Jan 15, 2009 8:36 am ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
180 loops per second for graphics, 456000 loops per seconds for speed^^ |
Author: | StealthArcher [ Thu Jan 15, 2009 10:39 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
Alrighty Full report: G off: 1021619 / sec G on Full Resolution 1440x900: 131/sec G on 1024x800: 314/sec Oh, and hi all. |
Author: | SNIPERDUDE [ Tue Jan 20, 2009 8:00 am ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
man, sounds like I need to get rid of this old box... |
Author: | copthesaint [ Tue Jan 20, 2009 3:30 pm ] |
Post subject: | RE:Check Turing\'s speed on YOUR computer |
Sniper You just need to upgrade your ram. Doing that your computer should rune alot faster (Turing can take up to !!2GB!! of ram while using! If turing begins to get slow exit and start up again) Go here: http://compsci.ca/v3/viewtopic.php?t=20105 For The newer program Turing 360 |