Author Topic: HP-Prime prototype performance test: color graphic programs  (Read 31957 times)

0 Members and 1 Guest are viewing this topic.

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
HP-Prime prototype performance test: color graphic programs
« on: August 08, 2013, 04:26:20 pm »
Several websites have begun comparing the TI-Nspire CX, Casio Classpad II fx-400CP and HP-Prime performances by using the softwares now available online.

It is a mistake because beyond the performance of the host computer, those software are often not emulators but simulators. They're running a system which has been rebuilt for the computer.



The calculation performances are often in direct link with the processor speed, and therefore we can expect the HP-Prime calculating faster than all its competitors.

Where we sometimes do have some surprises, is with programs dealing with lots of outputs/displays, mostly games. In fact, there is no dedicated graphic processor on our calculators. Thus output instructions "plunders" processor time, which consequently has less time to process calculations of the program itself. The more pixels and colors the screen can display, the more calculations required are required and it is a problem particularly for the TI-84 Plus C Silver Edition.



Therefore lets's check this evening if the HP-Prime's processor has the same problem. We will use our HP-Prime DVT prototype, and the new color tunnel game made by DJ_O for the HP-Prime software:

Now lets get a look of the game directly on the calculator itself:

It rocks... it's so fast that it becomes unplayable! ;D

On the HP-Prime we don't have access to assembly programs, and we wouldn't dare imagining what it would have done... The power of assembly is usually used by other calculator models for games. It seems it might be possible on the HP-Prime to develop huge games without a single line of assembly! You might even need to slow down your games with some loops! :P
But of course, the speed is not the only advantage of the assembly language, it also allows you to perform many usually achievable things... ;)



Download:
http://www.omnimaga.org/index.php?action=dlattach;topic=16752.0;attach=15851

Program source:
http://ourl.ca/19349/357143

Cross-posted from:
http://tiplanet.org/forum/viewtopic.php?p=146654&lang=en
« Last Edit: August 08, 2013, 04:28:39 pm by critor »
TI-Planet co-admin.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: HP-Prime prototype performance test: color graphic programs
« Reply #1 on: August 08, 2013, 04:40:56 pm »
Wow, that is pretty awesome! The HP-Prime is so faaast O.O
* Sorunome wants

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HP-Prime prototype performance test: color graphic programs
« Reply #2 on: August 08, 2013, 05:31:26 pm »
Dang! This speed is insane! O.O

It's like 4-5 times the speed of the original tunnel (which this game is based on):

[ Invalid YouTube link ]

This makes me wonder about sprites. I wonder what kind of data storage this calc supports besides lists, strings and vars? If there is a different smaller format, then maybe we could store sprite data then recall it later to display tilemaps pixel by pixel?

My concern are math operations, though. On the 39gII, maths, especially floating points calculations, were particularly slow compared to graphical display. In the Prime emu, if I use decimals I see a noticeable slowdown when I do complex animations and stuff.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #3 on: August 08, 2013, 06:28:38 pm »
Well, the goal was to make it so the default user language was fast enough that what previously only possible in assembly would be possible with the user language. Granted, assembly will always win since hand tuned code will always win over anything else no matter what. However, should be able to do a ton with what is there already, and it will only get better over time.

This is only first release... :-D

TW
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #4 on: August 08, 2013, 07:25:06 pm »
Indeed, and it's looking great so far Tim. :)

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #5 on: August 08, 2013, 08:23:23 pm »
This makes me wonder about sprites.

Something like this should work... haven't tested it. Scales it up too.

EXPORT Sprite()
BEGIN
DIMGROB_P(G2,4,4,{ #7C0003E0001F0000:64, #0, #0, #7C0003E0001F0000:64 });
BLIT_P(G0,20,20,100,100,G2,RGB(0,0,0));
WAIT(3);
END;

Quote
My concern are math operations, though. On the 39gII, maths, especially floating points calculations, were particularly slow compared to graphical display. In the Prime emu, if I use decimals I see a noticeable slowdown when I do complex animations and stuff.

Please elaborate. Basically, in the non-CAS programming there is absolutely no difference internally between 1 1.0, 1.1 or 1.1111111111. They are all the same thing.

TW
« Last Edit: August 08, 2013, 08:26:02 pm by timwessman »
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #6 on: August 08, 2013, 09:14:41 pm »
You might even need to slow down your games with some loops! :P
On the computer software, it seems as if there is a WAIT() command to wait a certain number of seconds, and it works with fractions of seconds. there is also TICKS for the overall system clock in milliseconds, which could be used to make timing or scoring more accurate/precise/cool.
« Last Edit: August 08, 2013, 09:17:04 pm by fortytwo »
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: Re: HP-Prime prototype performance test: color graphic programs
« Reply #7 on: August 08, 2013, 09:31:59 pm »
This makes me wonder about sprites.

Something like this should work... haven't tested it. Scales it up too.

EXPORT Sprite()
BEGIN
DIMGROB_P(G2,4,4,{ #7C0003E0001F0000:64, #0, #0, #7C0003E0001F0000:64 });
BLIT_P(G0,20,20,100,100,G2,RGB(0,0,0));
WAIT(3);
END;

Quote
My concern are math operations, though. On the 39gII, maths, especially floating points calculations, were particularly slow compared to graphical display. In the Prime emu, if I use decimals I see a noticeable slowdown when I do complex animations and stuff.

Please elaborate. Basically, in the non-CAS programming there is absolutely no difference internally between 1 1.0, 1.1 or 1.1111111111. They are all the same thing.

TW
thanks, I'll try that code later. As for decimals, I mean that in the emulator, I noticed that stuff like A+1.1 is noticeably slower than A+1. I'll have to give that another try when i get home on my comp.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline bb010g

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 428
  • Rating: +22/-1
  • I do stuff
    • View Profile
    • elsewhere on the net
Re: HP-Prime prototype performance test: color graphic programs
« Reply #8 on: August 08, 2013, 09:43:03 pm »
thanks, I'll try that code later. As for decimals, I mean that in the emulator, I noticed that stuff like A+1.1 is noticeably slower than A+1. I'll have to give that another try when i get home on my comp.
It might be that the C++ compiler is able to optimize Ints and Integers more than Floats and Doubles on the computer, yet on the calculator they are just as fast.
Arch Linux user
Haskell newbie | Warming up to Lua | Being dragged into C++
Calculators: HP 50g, HP 35s, Casio Prizm, TI-Nspire CX CAS, HP 28s, HP Prime, Mathematica 9 (if that counts)
π: 3.14...; l: 108; i: 105; e: 101; l+i+e: 314
THE CAKE IS A LIE IS A PIE

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: HP-Prime prototype performance test: color graphic programs
« Reply #9 on: August 08, 2013, 09:54:26 pm »
Oh that could explain it. Hopefully this doesn't cause speed disparity in games where stuff is calculated in both format alternatively. Not that speed should be a serious issue, from what I could see, though.

@critor: Question: Is the LCD refresh rate capped at a certain framerate like on the 39gII (which was 10 FPS)?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Spenceboy98

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 547
  • Rating: +59/-2
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #10 on: August 08, 2013, 09:54:30 pm »
I have a question. What do we know about lists on the Prime? I'd like to test some things. :P

Also, I love the speed. :D I'd much rather have one of these than a TI84PCSE.
« Last Edit: August 08, 2013, 09:55:33 pm by Spenceboy98 »
I like milk.

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #11 on: August 08, 2013, 10:02:03 pm »
I did some tests using the  TIME() command (times how long the argument takes), and it seems that floating points take about the same amount of time than any other number.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: HP-Prime prototype performance test: color graphic programs
« Reply #12 on: August 08, 2013, 10:09:41 pm »
Interesting. Anyway I personally hope we can also use smaller type of numbers and data, because if someone decides to make an RPG like Pokémon, that game will be absolutely massive >.<
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #13 on: August 08, 2013, 10:18:24 pm »
It might be that the C++ compiler is able to optimize Ints and Integers more than Floats and Doubles on the computer, yet on the calculator they are just as fast.

No, this wouldn't explain it. The only possible difference here might be on the PC with a binary integer object (#<digits>:<-sign><size><o|b|h|d>) and the normal reals (BCD encoded), but I would expect that is so tiny as to be nearly negligible.

All numbers in the numerical part of the system (ie not in the CAS) are BCD encoded. On the HW there are some hand written assembly routines for the low level BCD addition, subtraction, multiplication and so on, but just normal C code for the same on windows.

@critor: Question: Is the LCD refresh rate capped at a certain framerate like on the 39gII (which was 10 FPS)?

I believe the screen refresh is at 52hz.

TW
« Last Edit: August 08, 2013, 11:33:57 pm by timwessman »
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline Hooloovoo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 225
  • Rating: +22/-0
    • View Profile
Re: HP-Prime prototype performance test: color graphic programs
« Reply #14 on: August 08, 2013, 10:27:17 pm »
Next time, hit the modify button above your post instead of 'double posting'. Also, if you happen to have an IRC client, there is a lot of good conversation about calculators and other stuff going on in #omnimaga on EFNet.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale." -tr1p1ea
Spoiler For some of the calcs I own:



(actually I have quite a few more than this, but I don't feel like making bars for them all.)