Post Reply 
Can HP Prime be faster? - firmware performance comparison
09-07-2023, 07:59 AM (This post was last modified: 09-07-2023 08:17 AM by komame.)
Post: #10
RE: Can HP Prime be faster? - firmware performance comparison
(09-06-2023 06:51 PM)Insoft Wrote:  If you’re looking for faster performance from PPL look at Python
Python is way faster at graphical stuff like setting pixels drawing lines rectangles etc… v PPL

My goal was not to measure operations in graphics, but rather the overall performance of the HP Prime environment, which varied across different firmware versions. The main point of this thread is that in the past, HP Prime (with older firmware) was significantly faster, at least in the area of PPL operations. If you were to write a complex algorithm in PPL that calculates something on a list variable, and with the latest firmware, it takes 5 minutes to compute the result, running it on older firmware would only take 3 minutes (which I confirmed by flashing my HP Prime to an older version). My considerations aimed to reveal this fact and perhaps prompt the new firmware versions to restore the performance that was present in the older versions.

Returning to Python, there is also a notation where you don't need to use the PYTHON keyword in the PPL part.
Code:
#PYTHON name()
print('Python test')
#end

EXPORT START()
BEGIN
name();
END;

In the Python area, performance differences also exist for different firmware versions on the HP Prime, but they are significantly smaller. Python also ensures much greater measurement repeatability; for instance, a hard reset is not necessary because individual runs consistently yield similar results, often with precision down to single milliseconds. In the case of PPL programs, running the same program twice can yield varying duration measurements by even a few percent, indicating a certain level of instability in this language in that regard.

For example, let's examine this Python program (just empty loop for 5 million iterations):
Code:
#PYTHON python_test()
for i in range(0, 5000000):
  pass
#end

EXPORT START()
BEGIN
local t;
t:=TICKS;
python_test();
MSGBOX(TICKS-t);
END;

If you run it on G1 firmware version 14730, it will execute in 12055 ms, and on firmware version 14588, it will execute in 11699 ms (approximately 350 ms faster).

Nevertheless, Python is still an excellent candidate to succeed PPL, and if a stable runtime environment can be achieved, it will undoubtedly become the fastest Python on a calculator in the world, greatly enhancing its potential and providing much greater capabilities. Perhaps in this situation, it's not worth wasting time (and money) trying to improve PPL's performance; it might be better to focus on enhancing Python instead.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Can HP Prime be faster? - firmware performance comparison - komame - 09-07-2023 07:59 AM



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