Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
21 May, 2013, 10:02:46 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: Different execution speed between Clickpad and Touchpad -  (Read 391 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Deathrider
LV1 Newcomer (Next: 20)
*
Offline Offline

Last Login: Yesterday at 20:13:33
Date Registered: 02 May, 2012, 12:10:07
Posts: 13

Topic starter
Total Post Ratings: 0

View Profile
« on: 02 May, 2012, 12:50:58 »
0

Hi all,

I have two calculators: a Ti nSpire CAS Touchpad and a TI nSpire CAS Clickpad.
All of them have the last OS 3.1.0.392
I want investigate if they have the same execution speed so I wrote a simple program with the embeded editor. This program request as input a resistor value in ohm and gives as output the nearest combination of two resistors. I have wrote the program in way that it makes many for and while cycles and execute for 20~30 seconds before give an output. I have execute this program on the two calcultator and I have find that the Clickpad one is ~3-5 seconds faster than the clickpad one.

Why?Huh?

I think that the touchpad one have to spend some time in the touch part of the hardware.

I am right? What You think?
Logged
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:39:35
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #1 on: 02 May, 2012, 13:06:31 »
0

You should not use long for and while loops, that can give unexpected results as Lua programs are intented to be event based. Indeed, it might be part of the touch handling. (interrupts of the touchpad might break the lua execution some times).
Now, try to do it a different way. Use timer.getMilliSecCounter to get time different between just a couple of operations, and see what that gives Smiley
Logged

Deathrider
LV1 Newcomer (Next: 20)
*
Offline Offline

Last Login: Yesterday at 20:13:33
Date Registered: 02 May, 2012, 12:10:07
Posts: 13

Topic starter
Total Post Ratings: 0

View Profile
« Reply #2 on: 02 May, 2012, 14:15:45 »
0

I am not programming with Lua. I am using the editor embedded into the calculator. I think it is Ti Basic or something similar. I am using long for and while cycles in order to magnify the differences in the execution speed. I am not searching for optimize the code. I just wanted to see the differencies between the two calculators with the same OS but different hardware.

Question: I have to refresh my libraries everytime i make a mod to the source code of my program. What do exacltly the refresh? It seems to be a compilation...
Logged
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:39:35
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #3 on: 02 May, 2012, 22:14:25 »
0

Oh sorry, though Lua Tongue

Well, I suppose it can be because of the touchpad interrupts. They will interrupt the program flow multiple times, making it go slower.
But I am not sure. I wonder if there is a way to disable them and then test again.

Regarding the other question, I think libraries are duplicated somewhere, as they still work when you delete them. Not sure about that, but I think something like this might be the case. 
Logged

Deathrider
LV1 Newcomer (Next: 20)
*
Offline Offline

Last Login: Yesterday at 20:13:33
Date Registered: 02 May, 2012, 12:10:07
Posts: 13

Topic starter
Total Post Ratings: 0

View Profile
« Reply #4 on: 03 May, 2012, 12:02:52 »
0

I remember from my TI-86 (now dead) that I have to compile my programs before they can be used. If I do not compile a modified program, the old version still work. I think there is something similar in the nspire: the classical compile procedure produce an executable stored somewhere and working even if you cancel the source. I hope someone can explain this.
Logged
northern_snow
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 18 May, 2013, 15:23:02
Date Registered: 30 July, 2010, 07:34:33
Posts: 104


Total Post Ratings: +12

View Profile WWW
« Reply #5 on: 11 May, 2012, 15:14:34 »
0

I think you should make sure that the voltage of the batteries in two calculators are the same. That may influence the result.
Logged
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 08:22:03
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50208


Total Post Ratings: +2612

View Profile WWW
« Reply #6 on: 11 May, 2012, 15:44:42 »
0

Could it be that you ran another BASIC prog with a loop in it recently? I remember back in 2010 I ran a program that kept looping and afterward my calc lagged like crazy, like a computer running some process that takes 100% of the CPU.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.396 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.