Remove "fast FPU" build targets

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Should we remove the "fast FPU" build targets?

Poll ended at Thu Dec 25, 2008 6:26 pm

Yes
18
69%
No - I am currently using them
3
12%
No - I plan to use them
3
12%
I don't care, but can't resist voting in a poll.
2
8%
 
Total votes: 26

rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Remove "fast FPU" build targets

Post by rogerborg »

We currently have 3 build targets in the Visual Studio and Code::Blocks projects:

Debug
Release (precise)
Release (fast FPU)

The difference between release and release fast FPU is that the "fast" build adds flags to allow less accurate but (ostensibly) faster floating point operations.

However, the difference is (reportedly) marginal, the distinction is not clear, and maintaining these builds takes up time that could be used for other things.

I propose to remove the "fast FPU" targets from all builds, and only maintain debug and release targets. Anyone who wants a "fast" build (and who understands the issues involved) can trivially enable that locally.

Seek your say in the poll, or hereunder.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Post by joshcryer »

I voted no just because I'm lame (see my joke on IRC), but since it requires you to use up time maintaining them you can consider my vote a yes. :oops:

Sorry for messing up your poll, heh.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Have you found FPU inaccuracies that cause irr::core bugs? If so then I'll vote yes, if not it depends how much of a difference to Burning's renderer the fast FPU mode makes, because I guess this is where such optimizations would really make a difference.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

I wouldn't remove an optimization which allowed faster operation of the engine. Not obstant, if it is a source of troubles go ahead, as fas as i know, in GCC compilers is pretty easy to re-enable them if the need arises.

If you have the doubt, it must mean that it really doesn't matter at all to have it there or not, so remove it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Mirror
Posts: 218
Joined: Sat Dec 01, 2007 4:09 pm

Post by Mirror »

i vote for removing it. we don't live in 3742BC when we had ancient hardware. there is no need to try milking a fly.
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Mirror wrote:i vote for removing it. we don't live in 3742BC when we had ancient hardware. there is no need to try milking a fly.
You can never know which target platform would an Irrlicht application run on. It could be a 100 MHZ CPU, integrated graphic card with low mem and 64 MB RAM.
Don't you think such target platform (for example) would need that 'little' optimization?
And what if it doesn't have some cool floating point calculation device (or how ever it's called - like ALU for floating points, I think its FPU -whatever..), in such case floating point optimization would be exactly what it needs.

I guess because Irrlicht isn't just for the current high-end PCs it should not abandon such things.

Unless of course as bitplane said if those optimizations cause bugs and unexpected behaviors, it should be, in my opinion, fixed instead of removed, if possible.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

MasterGod wrote:You can never know which target platform would an Irrlicht application run on. It could be a 100 MHZ CPU, integrated graphic card with low mem and 64 MB RAM.
Don't you think such target platform (for example) would need that 'little' optimization?
The builds under discussion are Windows MSVC and Linux gcc Code::Blocks builds. What 100MHZ devices are those builds currently being run on?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

My settop box, 80MHz PPC, and an FPGA board, with 300MHz PPC. I won't use the project files, though, and the Makefile has -fast-math on by default 8)
joshcryer
Posts: 46
Joined: Thu Sep 13, 2007 8:57 am
Contact:

Post by joshcryer »

Just out of curosity hybrid do you run Irrlicht on the 80Mhz computer? If so how does it do? :D
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

How about we remove them and mention in the doc how one could re-enable them? If it's well written in the doc, no one's got an excuse for not reading it and acting on it... ^^
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, it seems to be 66MHz actually, but it renders something (SW renderer, tutorial 4, I made a photo some month ago and posted it somewhere on the forum) 8)
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

Post by wyrmmage »

I vote to remove them. Really, there's no reason to have them there...it's like having separate build targets for -O1, -O2, and -O3 flags: if you know the benefits of one over the other, you're going to know how to enable them :)
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You can remove the build target, but please keep the configuration define, there are some very interesting tweaks in there, stuff like fast sqrt, etc. (Tbh that particular example doesn't show any practical improvement, but it IS interesting.)

Also, I would recommend transferring some of the functions over, as some of them are infact faster and cause no inaccuracies, such as the fast floating point rounding which just invokes the fp rounding instruction present on all processors. (It's actually faster and more accurate to round to the nearest integer on modern cpus then to floor). Note I'm talking about cases where you need rounding, not flooring.

Cheers

PS: I voted I am currently using them before I realised you were just talking about the build target which I don't really care about personally.
Last edited by BlindSide on Fri Dec 19, 2008 11:19 am, edited 1 time in total.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Removing the build target would never mean to remove the code optimizations. While those could be better encapsulated, there's good reason to keep them and also develop more of them :)
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

if f = 0.999f would ever give me (int)(f) == 1, it would screw up lots of the logic behind my apps. This is a guarantee of the language, when you convert a float to int, it truncates whatever's after the dot. and floor wouldn't work either, because f = -0.999f gives you (int)(f) == 0, not -1. If I want (int) to round, I'll use the function that does it or write it myself. I don't expect my legacy c or my c++ cast to round.
Post Reply