Choose a C binary according to the enviroment

前端 未结 4 1383
-上瘾入骨i
-上瘾入骨i 2021-01-16 16:11

I have compiled my code with specific flags (-Os, -O2, -march=native and their combinations) in order to produce a faster execution time.

But my problem is that I d

4条回答
  •  余生分开走
    2021-01-16 16:29

    You may prebuilt a bunch of executables and choose one according to environment variable or things like uname. A Better approach to the problem is choose a toolchain that is able to perform JIT, install-time optimization and/or runtime optimization, like llvm.

提交回复
热议问题