Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Optimization flags (4 replies)

$
0
0
The default --with-cc-opt flags for Nginx are these:

*--with-cc-opt='-g -O2 -fstack-protector-strong -Wformat
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2'*
>

However I added more optimizations, which are against the standard:

*--with-cc-opt='-g -Ofast -march=native -ffast-math
> -fstack-protector-strong -Wformat -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2'*
>

So far I don't experience any bug, but I do have a higher benchmark:
380-450 req/s compared to the original 290-310 req/s with cached
Node/Express app on my laptop.

Is it safe to use -O3 or -Ofast flags with Nginx?

Is it possible to build Nginx with clang? If so, should I symlink it to gcc
(I use Docker, this way gcc executable is trashed) or is there a way to
define the compiler with a flag?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>