mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
inpttype.h: Use O1 instead of O0 on the critical function [Hans Ostermeyer]
Some benchmarking for different compilers and levels (seconds): gcc 4.4.7: O0=ICE O1=38.62 O2=58.13 O3=3721.11 gcc 4.5.4: O0=6.21 O1=25.63 O2=38.24 O3=3085.74 gcc 4.6.4: O0=4.95 O1=15.89 O2=32.94 O3=48.95 gcc 4.7.3: O0=6.11 O1=22.03 O2=126.41 O3=348.02 Hans tracked a wrong compile issue in 4.7 to the use of -O0. That table shows that -O1 is acceptable for everybody. Note that it isn't a time critical function, and it doesn't make sense to optimize it much (it's a bunch of calls to another function which itself is optimized and no computations).
This commit is contained in:
parent
5e243d9e9c
commit
3fc42de4e3
@ -49,7 +49,7 @@
|
||||
typelist.append(*global_alloc(input_type_entry(IPT_##_type, IPG_##_group, (_player == 0) ? _player : (_player) - 1, (_player == 0) ? #_type : ("P" #_player "_" #_type), _name, _seq, _decseq, _incseq)));
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
__attribute__((optimize("O0")))
|
||||
__attribute__((optimize("O1")))
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#pragma optimize("", off)
|
||||
|
Loading…
Reference in New Issue
Block a user