- division is much slower than multiplication
- log10(), sqrt() are also very slow -- should avoid using these unless absolutely necessary
- inlines can be of tremendous help, as it may be easier for the compiler to optimize
- a for loop like for(i=1;i<=10;i++) can be re-written as for(i=10;i--;), which may save a little bit of time
何以為人,還有也談 privilege
3 months ago

No comments:
Post a Comment