Post Reply 
RPN83P: RPN calculator for TI-83+ TI-84+ inspired by HP-42S
11-29-2023, 10:00 PM
Post: #31
RE: RPN83P: RPN calculator for TI-83+ TI-84+ inspired by HP-42S
(11-21-2023 05:24 PM)bxparks Wrote:  
(11-21-2023 09:26 AM)Gerald H Wrote:  PRIM actually finds a factor, otherwise returning 1 for prime input.
PRIM works very fast - What algorithm have you used?

[...]
The largest prime number <= 2^16 is 65521, so the longest execution time of PRIM is the factorization of 65521*65521=4 293 001 441. That takes 33 seconds on a TI-84+SE.
[...]

Good news. I made my app 2.5X faster on the 83+SE, 84+, and 84+SE models with almost no effort. So PRIM finishes the factorization of 65521*65521 in about 13 seconds instead of 33 seconds on these machines. It turns out these 3 later models use Z80 processors which can run at 2 speeds: 6 MHz or 15 MHz. But I didn't know that flash apps are configured to run at 6 MHz by default, for backwards compatibility with the original 83+ which can only run at 6 MHz. So I added a few lines of code to configure my app to run at 15 MHz, and bam, everything runs faster.

I guess I didn't need to optimize my app so much. But in return, I now have an app that is perfectly usable on the oldest, slowest, and cheapest TI-83+ calculator. I bought one locally for $10 the other day, for testing purposes. I expected my app to run 2.5X slower, but it ran just fine. Which led me down this rabbit hole.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPN83P: RPN calculator for TI-83+ TI-84+ inspired by HP-42S - bxparks - 11-29-2023 10:00 PM
Fat Man and Little Boy - gentzel - 11-06-2024, 09:29 PM



User(s) browsing this thread: 31 Guest(s)