LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-04-2011, 01:29 PM   #1
JonathanWilson
Member
 
Registered: Aug 2009
Location: Ilkeston, England
Distribution: ubuntu, xp, embeded
Posts: 79

Rep: Reputation: 1
What is quicker/best soft, softfp, or hardfp and when?


I've tried to look on google but can't really find an answer.

What I'm wondering is when the different compile options are most apropriate.

My guess is that soft (full emulation) is best when there is no FPU at all.

softfp is best when there is potentially a fpu

hardfp is best when you know there is a FPU

A cpu with no FPU will be faster with soft than softfp due to the overhead of checking or capturing an error when the fpu is absent and reverting to software fpu calculations.

a cpu with a fpu will be faster with hardfp as no tests are performed/errors triggered saying no fpu available so it hits the hardware imediatly.

Would these assumptions be correct?
 
Old 04-25-2011, 12:45 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,148

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Quote:
Originally Posted by JonathanWilson View Post
I've tried to look on google but can't really find an answer.

What I'm wondering is when the different compile options are most apropriate.

My guess is that soft (full emulation) is best when there is no FPU at all.

softfp is best when there is potentially a fpu

hardfp is best when you know there is a FPU

A cpu with no FPU will be faster with soft than softfp due to the overhead of checking or capturing an error when the fpu is absent and reverting to software fpu calculations.

a cpu with a fpu will be faster with hardfp as no tests are performed/errors triggered saying no fpu available so it hits the hardware imediatly.

Would these assumptions be correct?
hardfp compiles inline FP instructions. If you have an FPU this will be fastest. If you don't, every FP instruction will trap to an emulation routine (assuming your runtime supports this).

softfp will compile a library call for every FP operation. Use this if you never run on a system with an FPU.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quicker way to delete folders than rm -r folder_name nbdr Linux - Newbie 21 01-08-2010 08:37 AM
quicker rpmbuild guy.sadger Linux - General 1 09-08-2009 06:36 AM
Which is quicker - rsyncd or NFS? brooky9999 Slackware 3 02-11-2008 09:47 PM
quicker compile dragozfire *BSD 3 11-13-2004 05:28 AM
A quick Hello and a quicker ? stikboy Linux - General 2 03-15-2003 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration