Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Rapsberry PI - cpu dilemma
Rapsberry PI - cpu dilemma [message #53840] Fri, 08 May 2020 16:36 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
There is an interesting issue. Original PI had Armv6 CPU, since PI 2, it is Armv7.

However, all binaries are still compiled for PI 1.

There two major differences between those 2 CPUs:

- Armv7 allows unaligned memory access, which is quite useful to optimize some things (e.g. Stream::Get32 method)
- Armv7 supports thumb 2, which results in significantly reduced code size

It is possible to activate compilation for Armv7 with clang (and GCC) using compiler flags and the code is really quite better, on platform where every bit of performance matters.

So it makes me think we should react to this somehow. I can definitely detect that I am running on RPI with armv7 and add those flags to default build methods. But that would make resulting binaries not work on original PI and on PI zero....

So I can:

- ignore armv7, leave it to user
- ignore PI 1 / 0 and the fact that resulting binary will not work on them, simply add damned flags
- create CLANG method for armv7 and CLANG_armv6 for backward compatibility with PI 1 / 0 (*)
- create CLANG method for armv6 and optimized CLANG_armv7

(*) is my currently the prefered plan...

Any ideas? Smile

(also posting it here for future documentation reference).

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: memcpy() and memmove() optimization
Next Topic: Optimizing DrawImage across platforms
Goto Forum:
  


Current Time: Sat Apr 27 17:11:51 CEST 2024

Total time taken to generate the page: 0.06994 seconds