diff --git a/CMakeLists.txt b/CMakeLists.txt index d92dd47..5598d45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,16 +351,19 @@ if(DEBUG) check_option(ARCH_DEBUG_OPTIONS ${ARCH_DEBUG}) add_compile_options(${ARCH_DEBUG_OPTIONS}) else() - check_option(OPTIONS_RELEASE -O2 - -ffast-math - -fipa-pta - -ftree-vectorize - -fstdarg-opt - -fomit-frame-pointer - -frename-registers - -ffunction-sections - -fdata-sections - -fvisibility=hidden) + check_option(OPTIONS_RELEASE -O2 + -ffast-math + -fipa-pta + -fipa-sra + -ftree-vectorize + -fstdarg-opt + -fomit-frame-pointer + -frename-registers + -ffunction-sections + -fdata-sections + -fvisibility=hidden + -fno-asynchronous-unwind-tables + -fno-semantic-interposition) add_compile_options(${OPTIONS_RELEASE}) add_link_options(-Wl,-O2 @@ -370,10 +373,14 @@ else() -Wl,--strip-all -Wl,--no-copy-dt-needed-entries) if(NOT WIN32) - check_option(OPTIONS_RELEASE_WIN32_FLTO -flto) + check_option(OPTIONS_RELEASE_WIN32_FLTO -flto=auto) add_compile_options(${OPTIONS_RELEASE_WIN32_FLTO}) add_link_options(${OPTIONS_RELEASE_WIN32_FLTO}) endif() + if(LINUX) + check_option(MEOW_OPT -fno-semantic-interposition) + add_compile_options(${MEOW_OPT}) + endif() check_option(ARCH_RELEASE_OPTIONS ${ARCH_RELEASE}) add_compile_options(${ARCH_RELEASE_OPTIONS}) endif() diff --git a/scripts_benchmark/Main.rb b/scripts_benchmark/Main.rb index bdb498e..52a0890 100644 --- a/scripts_benchmark/Main.rb +++ b/scripts_benchmark/Main.rb @@ -1,9 +1,6 @@ # Engine benchmark idk, check speed via linux time utility - begin RPG::Mod.exec_hooks("test", binding) - Audio.bgm_play("Audio/BGM/MyBurdenIsLight.ogg", Audio.bgm_volume, 100) - count = 0 while count <= 500000 do puts count @@ -37,16 +34,7 @@ begin Font.default_size = count count += 1 end - - - Graphics.setVsync(0) - Graphics.setVsync(1) - Graphics.setVsync(-1) - Graphics.smooth = true - Graphics.smooth = false - Graphics.frame_reset - Graphics.update - Oneshot.shake + Sunshine.crashprivacy=true Wallpaper.reset Input.set_led(255, 150, 30) @@ -55,11 +43,55 @@ begin File.exist?("oneshot") Oneshot.exiting false Oneshot.exiting true - Audio.bgm_fade(800) - Audio.bgs_fade(800) - Audio.me_fade(800) - Audio.se_play('Audio/SE/title_decision.wav') - + puts CTime.month + puts CTime.day + puts CTime.hour + Sunshine.wallpapermode="fallback" + Sunshine.wallpapermode="disabled" + Sunshine.wallpapermode="normal" + puts Sunshine::SDLVersion_major + puts Sunshine::SDLVersion_minor + puts Sunshine::SDLVersion_micro + puts Sunshine::SECURITYSTATE + puts Sunshine::VERSION + puts Sunshine::DEVBUILD + count = 0 + Oneshot.shake + Oneshot.shake + Oneshot.shake + Oneshot.shake + Oneshot.shake + while count <= 9999999 do + count.clone + count = count + 1 + puts count + Graphics.setVsync(0) + Graphics.setVsync(1) + Graphics.setVsync(-1) + Graphics.smooth = true + Graphics.smooth = false + Graphics.frame_reset + Graphics.update + begin + raise 'Boom!' + rescue + puts 'Rescued an exception.' + end + begin + 1 / 0 # Raises ZeroDivisionError, a subclass of StandardError. + rescue + puts "Rescued #{$!.class}" + end + begin + Dir.open('nosuch') + rescue Errno::ENOTDIR + puts "Rescued #{$!.class}" + rescue Errno::ENOENT + puts "Rescued #{$!.class}" + rescue + puts "g" + end + end rescue Errno::ENOENT filename = $!.message.sub("No such file or directory - ", "") print("Unable to find file #{filename}.") diff --git a/toolchain/arch/x86.cmake b/toolchain/arch/x86.cmake index ca3ea12..9007c30 100644 --- a/toolchain/arch/x86.cmake +++ b/toolchain/arch/x86.cmake @@ -2,5 +2,7 @@ set(ARCH_COMMON "") set(ARCH_RELEASE -mnoreturn-no-callee-saved-registers -mrelax-cmpxchg-loop - -momit-leaf-frame-pointer) + -momit-leaf-frame-pointer + -mgather + -mscatter) set(ARCH_DEBUG "")