Another point, I tried to use “-O3” or “-O1” for extra_compile_flags in “setup.py”, there is no difference, always 16ms.
Then I tried removing “-O3” in the source file #pragmas and using “g++” to compile it directly, the perfomance is now 35ms. Adding “-O1” will result in 6-7ms.