Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Portal Player Battery runtime vs compiler
« previous next »
  • Print
Pages: [1] 2

Author Topic: Portal Player Battery runtime vs compiler  (Read 4392 times)

Offline scharkalvin

  • Member
  • *
  • Posts: 332
Portal Player Battery runtime vs compiler
« on: November 02, 2007, 12:35:01 PM »
I recently noticed some benchmarks comparing several different arm compilers used for embedded developement.  I was shocked to see that GCC was pretty bad compared to some of the commerical tools, in fact it produced code that ran as much as an order of magnitude slower in some benchmarks.  Could this be part of the reason for poor runtime on the portal player targets?  Has anybody tried building rockbox using one of the better commerical compilers?   (probably would take a lot of editing to fix syntax differences between compilers)

The only flaw in this is the Gigabeat (also an arm cpu) that doesn't suffer as badly in runtime compared to the OF.
Logged

Offline AlexP

  • Global Moderator
  • Member
  • *
  • Posts: 3688
  • ex-BigBambi
Re: Portal Player Battery runtime vs compiler
« Reply #1 on: November 02, 2007, 12:42:11 PM »
In fact the gigabeat battery life under rockbox is at least as good as the OF if not longer.
Logged
H140, F60, S120, e260, c240, Clip, Fuze v2, Connect, MP170, Meizu M3, Nano 1G, Android

Offline scharkalvin

  • Member
  • *
  • Posts: 332
Re: Portal Player Battery runtime vs compiler
« Reply #2 on: November 02, 2007, 12:43:26 PM »
Well Toshiba might have compiled their firmware using GCC (level playing field).
Logged

Offline GodEater

  • Member
  • *
  • Posts: 2829
Re: Portal Player Battery runtime vs compiler
« Reply #3 on: November 02, 2007, 12:46:10 PM »
Quote from: scharkalvin on November 02, 2007, 12:35:01 PM
Has anybody tried building rockbox using one of the better commerical compilers?   (probably would take a lot of editing to fix syntax differences between compilers)

I don't believe so.

We're pretty convinced it's not the code from gcc which is the issue.
Logged

Read The Manual Please

Offline linuxstb

  • Developer
  • Member
  • *
  • Posts: 1163
Re: Portal Player Battery runtime vs compiler
« Reply #4 on: November 02, 2007, 12:53:45 PM »
Whilst we all agree that gcc can be pretty bad at generating ARM code, it's probably worse at generating code for Coldfire, and Rockbox manages longer runtimes than the original firmware on all targets.

In addition, a lot of the performance-critical code has been optimised in ARM assembler, making gcc irrelevant.

Also, Rockbox is an open source project - we simply don't want to use closed-source (and expensive) commercial compilers, for both practical and philosophical reasons.

Buthaving said that, if someone wanted to get Rockbox to build with such a compiler, I'm sure we would all be curious to know the results.
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Portal Player Battery runtime vs compiler
« Reply #5 on: November 02, 2007, 12:55:17 PM »
It's been mentioned in the past that lack of understanding of certain PP registers is the issue. We can't shut off certain parts of the PP chipset that aren't used. (Correct me if I'm wrong.)

Where's a PortalPlayer datasheet when you really need it? ;)
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Portal Player Battery runtime vs compiler
« Reply #6 on: November 02, 2007, 01:03:39 PM »
Quote from: scharkalvin on November 02, 2007, 12:35:01 PM
 I was shocked to see that GCC was pretty bad

You must be easily surprised.
Logged

Offline scharkalvin

  • Member
  • *
  • Posts: 332
Re: Portal Player Battery runtime vs compiler
« Reply #7 on: November 02, 2007, 01:28:50 PM »
I'm using GCC for the AVR processor at work and the performance is
quite good.  Maybe we could do better with a professional tool set,
but it hasn't been an issue.  In the PC (x86) area GCC probably DOES benchmark
quite good.  Then again, that's where it's used the most and has seen the most testing.

The issues with the Portal Player cpu make sense to me, it sounds like a special purpose chip designed for use in media players while Gigabeat is using a GP arm cpu with well know other parts.  Oh, well so much for low hanging fruit.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Portal Player Battery runtime vs compiler
« Reply #8 on: November 02, 2007, 02:36:19 PM »
Another point is that on one PortalPlayer CPU (the PP5002 at least) we now perform better than the Apple firmware. It's just our knowledge of the PP502x series that's restraining us.

Considering we're beating the Apple firmware on the early generation iPods, I'd suggest wholeheartedly it's not GCC that's the problem. ;)
Logged

Offline LambdaCalculus

  • Member
  • *
  • Posts: 2257
  • Dreaming of Turing Machines...
    • The Nostalgia Roadtrip
Re: Portal Player Battery runtime vs compiler
« Reply #9 on: November 02, 2007, 02:52:45 PM »
Quote from: Llorean on November 02, 2007, 02:36:19 PM
Another point is that on one PortalPlayer CPU (the PP5002 at least) we now perform better than the Apple firmware. It's just our knowledge of the PP502x series that's restraining us.

Yes, that's true. I read that now even the 2nd gen iPod surpassed the OF battery life.

If we just had that information for the PP502x series in our hands... datasheets, register values, anything! It seems that the H10 (PP5020) and Sansa e200 (PP5024) are the worst offenders for battery life; solving this issue should help them out immensely.
Logged
Former Rockbox dev. Rising from the ashes...

Players: iPod Video /w 128GB SSD mod, H320 /w 128GB SSD mod

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Portal Player Battery runtime vs compiler
« Reply #10 on: November 02, 2007, 06:59:17 PM »
Quote from: LambdaCalculus379 on November 02, 2007, 02:52:45 PM
Quote from: Llorean on November 02, 2007, 02:36:19 PM
Another point is that on one PortalPlayer CPU (the PP5002 at least) we now perform better than the Apple firmware. It's just our knowledge of the PP502x series that's restraining us.

Yes, that's true. I read that now even the 2nd gen iPod surpassed the OF battery life.

If we just had that information for the PP502x series in our hands... datasheets, register values, anything! It seems that the H10 (PP5020) and Sansa e200 (PP5024) are the worst offenders for battery life; solving this issue should help them out immensely.

The e200 is actually one of the best PP targets for battery life.  I think until the P5002 improvements it was the best.  It seems to use less power then the other PP targets, perhaps because the lack of IDE hardware means theres less stuff for us to have improperly initialized.  
Logged

Offline tychver

  • Member
  • *
  • Posts: 5
Re: Portal Player Battery runtime vs compiler
« Reply #11 on: November 02, 2007, 09:40:25 PM »
Possibly a stupid question but have any improvements been seen when newer GCC versions were used? The wiki still recommends 4.0.3 for ARM. Didn't 4.2.2 just come out? I noticed the daily builds are still done with it.
Logged

Offline Lear

  • Developer
  • Member
  • *
  • Posts: 533
Re: Portal Player Battery runtime vs compiler
« Reply #12 on: November 03, 2007, 09:58:40 AM »
I just made a quick test using 4.2.2. No big differences that I could see. Build size was about the same (comparing slightly different versions though), and the speed difference (for the codecs I tested) was small. 1-2 percent or so, sometimes faster, sometimes slower. So there's no particular gain by updating the compiler.
Logged

Offline tychver

  • Member
  • *
  • Posts: 5
Re: Portal Player Battery runtime vs compiler
« Reply #13 on: November 03, 2007, 10:59:08 PM »
Just out of interest, which codecs were faster and which were slower? How well does rockbox parallelize across both cores? Last time I was messing around with it I think it had got to the stage of running UI and WPS and kernel on one core and the codec thread on the other.

Is this going to make a big difference to the ammount of work done in parallelizing? It sounds like it: http://gcc.gnu.org/wiki/AutomaticParallelization

Sorry if it's a stupid question; the most complex things I did were hacking up the scroll acceleration patches.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Portal Player Battery runtime vs compiler
« Reply #14 on: November 03, 2007, 11:53:44 PM »
Quote from: tychver on November 03, 2007, 10:59:08 PM
How well does rockbox parallelize across both cores? Last time I was messing around with it I think it had got to the stage of running UI and WPS and kernel on one core and the codec thread on the other.

Rockbox does not parallelize across cores yet, except for mpegplayer and the SPC codec (assuming that got committed).

Quote from: tychver on November 03, 2007, 10:59:08 PM
Is this going to make a big difference to the ammount of work done in parallelizing? It sounds like it: http://gcc.gnu.org/wiki/AutomaticParallelization

No thats not useful to us, and probably not very useful in general.  Autoparallelization is pretty ineffective.  
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  Portal Player Battery runtime vs compiler
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.125 seconds with 15 queries.