godot/platform/iphone
Hein-Pieter van Braam e5b335d367 Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841
2019-01-09 02:06:13 +01:00
..
export Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
app_delegate.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
app_delegate.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
detect.py Don't use -ffast-math or other unsafe math optimizations 2019-01-09 02:06:13 +01:00
game_center.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
game_center.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
gl_view.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
gl_view.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
godot_iphone.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
icloud.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
icloud.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
in_app_store.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
in_app_store.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
ios.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
ios.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
logo.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
main.m Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
os_iphone.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
os_iphone.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
platform_config.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
platform_refcount.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
power_iphone.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
power_iphone.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
SCsub SCons: Allow building Mono module with OSXCross 2018-12-22 12:36:19 +01:00
sem_iphone.cpp Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
sem_iphone.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
view_controller.h Update copyright statements to 2019 2019-01-01 12:58:10 +01:00
view_controller.mm Update copyright statements to 2019 2019-01-01 12:58:10 +01:00