-
-
Notifications
You must be signed in to change notification settings - Fork 212
rp2040 core does not use rom floating point functions #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @WestfW , |
Here's a quick benchmark of tangent (which was one of the more computationally intensive of the library functions.) Nearly 10x improvement using the ROM functions! Philhower core, variant rpipico (using ROM float functions) Arduinocore (using gcc float functions.)
|
What happens if this is RAM only? Edit: |
What? RAM-only executables can still call ROM. What does precomputation have to do with anything? |
RAM only is to see if the access time plays a role in the performance or not. RAM and ROM should be about the same.
Nothing, it was just a guess for why.
Can you degrade performance using SDK to recreate the numbers you see with MBED? If so, you can test RAM only with copy to RAM to prove if flash is a problem. Flash is likely a problem no matter what. Unless there is a defect in the ROM version, I would guess the ROM version will always be better. Edit: |
Can't comment on the linker opts, but I would remind you that the rom functions are faster partly because they are intentionally less accurate (and in particular the rom code is not IEEE754 conformant). I would therefore argue that giving users a choice between smaller-faster-but-less-accurate and larger-slower-but-more-accurate was useful, rather than forcing one selection on all users. |
Not true, at least in principle...
|
The rp2040 includes optimized floating point functions in ROM, using linker magic to replace the standard gcc floating point functions when building applications from the pico SDK or Philhower core.
But the Arduino mbed core for rp2040 does not do the linker magic, causing applications that use floating point to be much slower (and larger) than on other rp2040 platforms.
the linker magic is included here: https://github.com/earlephilhower/arduino-pico/blob/master/lib/platform_wrap.txt
Arduino's (much smaller) link options: https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/RASPBERRY_PI_PICO/ldflags.txt
The text was updated successfully, but these errors were encountered: