玄学优化

Posted louhancheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了玄学优化相关的知识,希望对你有一定的参考价值。

十分诡异的优化。。。

#pragma GCC diagnostic error "-std=c++11"
#pragma GCC optimize("-fdelete-null-pointer-checks,inline-functions-called-once,-funsafe-loop-optimizations,-fexpensive-optimizations,-foptimize-sibling-calls,-ftree-switch-conversion,-finline-small-functions,inline-small-functions,-frerun-cse-after-loop,-fhoist-adjacent-loads,-findirect-inlining,-freorder-functions,no-stack-protector,-fpartial-inlining,-fsched-interblock,-fcse-follow-jumps,-fcse-skip-blocks,-falign-functions,-fstrict-overflow,-fstrict-aliasing,-fschedule-insns2,-ftree-tail-merge,inline-functions,-fschedule-insns,-freorder-blocks,-fwhole-program,-funroll-loops,-fthread-jumps,-fcrossjumping,-fcaller-saves,-fdevirtualize,-falign-labels,-falign-loops,-falign-jumps,unroll-loops,-fsched-spec,-ffast-math,Ofast,inline,-fgcse,-fgcse-lm,-fipa-sra,-ftree-pre,-ftree-vrp,-fpeephole2",3)
#pragma GCC target("avx","sse2")

以上是关于玄学优化的主要内容,如果未能解决你的问题,请参考以下文章

LightOJ 1098(均值不等式,整除分块玄学优化)

[科技]$Miller\_Rabin$ 和 $Pollard\_Rho$ 及各种玄学优化

各种各样的——玄学搜索

一些有用的小技巧/小公式/玄学优化(雾

优化 C# 代码片段、ObservableCollection 和 AddRange

使用 C++ 反转句子中的每个单词需要对我的代码片段进行代码优化