Computer Science Canada

Why is Turing so Slow?

Author:  Catalyst [ Wed Apr 02, 2003 5:11 pm ]
Post subject:  Why is Turing so Slow?

Does any one know?
is it because they dont have a real compliler?
or is it something else?

Author:  Asok [ Wed Apr 02, 2003 5:17 pm ]
Post subject: 

I origionally believed turing was simply a memory hog but that doesn't seem to be the issue (I've tested it)

Author:  Tony [ Wed Apr 02, 2003 5:21 pm ]
Post subject: 

its because of the way turing works. The translate its into C++ and compile that, but because of it, the code compiled isn't as efficient. I have a guess that there's tons of needless loops and variable declarations going on. Also they include all the header files adding in the weight (or atleast exe size)

Turing cant seem to handle your programs, eh Catalyst? Wink

Author:  Martin [ Wed Apr 02, 2003 6:12 pm ]
Post subject: 

It's because it's designed to be simplified. Some things have to lack for simpler syntax.
One of the main things is the inclusion of commands.
For example, in c++ if you want to do file input/output you'd have to put #include <fstream> and that would allow you to use it. However, turing automatically includes all of the information you need to open/close files even if your program doesn't use it. The same thing goes for all of the other modules. Does your program use Math.Arctand? Well, it could. Another annoying thing is that turing includes multiple versions of the same command. drawfillbox and Draw.FillBox do exactly the same thing, but they are included twice. The same goes for setscreen and View.Set, as well as a whole bunch of things.
The reason that turing graphics are so slow is just that it doesn't use any hardware acceleration or any efficient graphics methods. This is required for simplicity (get into DirectX or openGL and you'll see why).
Another reason that C++ is faster than turing is because it's been ripped apart by programmers. 99% of the programmers who use turing are in highschool, and don't have the knowledge to do anything with the actual program itself (turing). C++, however, is used by everyone, from highschool students to billion dollar companies. It's been ripped apart, optomized and re-written hundreds of times.

Author:  haujobb [ Wed Apr 02, 2003 6:16 pm ]
Post subject: 

1. Wouidn't making the program a .exe increase the speed a bit?
2. Is it possible to use DirectX or OpenGL with turing?

Author:  Tony [ Wed Apr 02, 2003 6:22 pm ]
Post subject: 

well your final program has to be exe anyway, and I dont think it has any difference in speed.

ans no, you cant use DirectX / OpenGL.

Author:  Blade [ Wed Apr 02, 2003 6:50 pm ]
Post subject: 

making it an exe does speed it up... it happened with my pong game...

Author:  yuethomas [ Wed Apr 02, 2003 9:58 pm ]
Post subject: 

The only reason I can see why the EXE form speeds up, is that not the whole Turing IDE / debug system is loaded with the EXE.

Isn't the EXE just Turing code wrapped in a slightly modified interpreter that only reads the code embedded?