Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: Hot_Dog on April 19, 2011, 07:27:16 pm
-
Let's say TI-Nspire speed could be measured on a scale of 1-10, with Ti-Basic code at 1 and ASM/C Code at 10.
Very, very roughly, where would Lua fall on this scale?
PS: Imo speed doesn't matter. I know that the importance of LUA is what it can let Ti-Basic users do. I'm just curious ;D
-
No idea, but Nspire BASIC is already pretty fast :hyper:
-
I cannot make that comparison for NSpire Lua -- but if TI basic for computer (:P) was 1 and x86 assembly as a 10, computer Lua is a bit closer to a 5. Python is a 7. Java is 8, C is 9, for more comparison ;)
-
It's hard to tell. If they use the same code for both interpreters, maybe the speed is the same. That said, Lua offers a bit more freedom even if it's a stripped version of it.
-
Exactly : 8
I can make a 30fps program displaying 3D models in a complete animation.
This test has been performed by calculating how fast my program can display a model during a rotatation of 2*pi with a pi/100 increment and a refresh rate of 100fps (100fps => 30fps, 10fps => 7fps).
It is really good, to my mind, comparing to the TI-Basic that need over than 2 secondes to display the same model only one time.
-
Wow! is that your port of Make3D getting 30 FPS? That's probably looking pretty fuzzy on the screen (darn crappy lcds :P), and that is really, really fast!
-
Exactly : 8
0_0
-
That is fast ... like Axe fast (compared to other Z80 calc stuff, of course).
Guess I'm gonna learn Lua after all :D
-
Well, the Calc is at least 15 times more powerful. ARM vs z80, ARM wins. even if the z80s were 150 mhz, they would still lose.
-
Well, the Calc is at least 15 times more powerful. ARM vs z80, ARM wins. even if the z80s were 150 mhz, they would still lose.
Partly, but not fully, because it has automatic multiplication (in z80, we have to do multiplication ourselves!)
-
Wow! is that your port of Make3D getting 30 FPS? That's probably looking pretty fuzzy on the screen (darn crappy lcds :P), and that is really, really fast!
Yes !
Have a look :
http://education.ti.com/html/nspireplayer/3.0.1/application/index.html?locale=en&nspirefile=http://levak.free.fr/ftp/nspire/Make3D/Make3D.tns
(I have to keep a GUI for nspire-player whereas there are many shortcuts activated to modify some globals)
-
Nice! :w00t: Great demo! It's so fast!
-
It is, wow O.O
-
Wow this is great. I'm going to love to see how my game does. I hope I don't over do it
-
@Hot Dog how is automatic multiplication a bad thing? Hardware multiplication would be faster, not slower, than software based methods.
Also, I hate TI hating linux. :( Not supported :P
-
Also, I hate TI hating linux. :( Not supported :P
I know what you mean! I run linux on all of my computers except for one that runs windows. The only thing I use windows for is nspireLink, notepad for lua and LUAtoTNS.... I sometimes wish I had a mac that I could dual boot linux OSX
-
Also, I hate TI hating linux. :( Not supported :P
I know what you mean! I run linux on all of my computers except for one that runs windows. The only thing I use windows for is nspireLink, notepad for lua and LUAtoTNS.... I sometimes wish I had a mac that I could dual boot linux OSX
I do! And windows as well! Which is very fun, b/c the most I've ever run is one virtualized windows, one virtualized linux, mac native, netbeans and safari. I love spaces too...
-
I don't care too much for Mac computers. They're just too overpriced for what they are. Running a Hackintosh is better.
-
Yes a good hackintosh is really nice. For awhile I wanted one just for the multitouch trackpad, it's one of the best on the market but since apple released the standalone desktop trackpad, the linux community has created drivers for it so I should really just buy one for my linux box...
-
True, they are very expensive. Although they are generally nice computers as well.
-
But I can make nicer ones for less by hand :P and I can't think of a mac benefit that doesn't happen through linux, for myself anyhow. (except TI link support :P)
-
Well, the Calc is at least 15 times more powerful. ARM vs z80, ARM wins. even if the z80s were 150 mhz, they would still lose.
Partly, but not fully, because it has automatic multiplication (in z80, we have to do multiplication ourselves!)
In how many cycles can the ARM do multiplication? As an example the SH4A can do 32 *32 = 64, 32 * 32 = 32, @32 * @32 = 32 in 2 cycles. And it does 16 * 16 = 32 in 1 cycle. This is of course only when it is written properly. Otherwise it is 5 cycles and 3 cycles respectively.
And for the linux thing. Is it possible to use wine for the nspire link support and LUAtoTNS.
-
If you go on over to hackspire there is a lua2tns program, I don't know if it is the exact same one as you are thinking but in short yes there is an easy way to get lua to tns on linux. I haven't tried tilink on wine but from past experience wine programs can't usually connect to external devices (At least with all of the programs I've ever tried) It's always worth a shot though! Give me a shout if you get it working!
-
Well, the Calc is at least 15 times more powerful. ARM vs z80, ARM wins. even if the z80s were 150 mhz, they would still lose.
Partly, but not fully, because it has automatic multiplication (in z80, we have to do multiplication ourselves!)
In how many cycles can the ARM do multiplication? As an example the SH4A can do 32 *32 = 64, 32 * 32 = 32, @32 * @32 = 32 in 2 cycles. And it does 16 * 16 = 32 in 1 cycle. This is of course only when it is written properly. Otherwise it is 5 cycles and 3 cycles respectively.
The ARM9EJ-S processor does the following multiplications (with optional accumulate operand):
32-bit = 16-bit*16-bit (signed only, 1-2 cycles)
32-bit = (32-bit*16-bit)>>16 (signed only, 1-2 cycles)
32-bit = 32-bit*32-bit (2-3 cycles)
64-bit = 32-bit*32-bit (signed or unsigned, 3-4 cycles)
64-bit += 16-bit*16-bit (signed only, 2-3 cycles)
Also, these instructions use the general-purpose registers as destinations.
-
@z80man, no, WINE can't do hardware. There is TilP tho, and there's a Linux version of Lua2TI.
Unfortunately, OS 3.0 can't send with TilP. Can't test for the docs.
-
@Hot Dog how is automatic multiplication a bad thing? Hardware multiplication would be faster, not slower, than software based methods.
I actually said automatic multiplication was a good thing. I was insulting the z80
-
For now, I didn't spend time debugging and fixing TILP for sending OS 3.0 - but as we watch the stories of huge problems with OS 3.0 unfold, I don't think that it's much of a problem that TILP will refuse to send that crap :)
Coming back to the earlier posts of the topic: Python is actually not too fast ;)
The VM is fairly heavyweight, and (due to a combination of the VM's performance, and the way user code is written) performance of a number of Python programs, e.g. various Linux distro package managers, is known to be lackluster. I remember about some operations of one of the package managers being more than an order of magnitude faster in C++ than in Python...