The best optimization, for size, speed, cleverness, clarity, and anything else you may think of, is to have no code.
So, just remove those 4 lines from your source(s) and you’ve optimized your code.
More Related Contents:
- Competitive programming: "Time exceeded error"
- optimized sum of an array of doubles in C [duplicate]
- Improve INSERT-per-second performance of SQLite
- What is the fastest/most efficient way to find the highest set bit (msb) in an integer in C?
- Are compilers allowed to eliminate infinite loops?
- Why does glibc’s strlen need to be so complicated to run quickly?
- Rounding up to next power of 2
- Can the linker inline functions?
- Is it safe to read past the end of a buffer within the same page on x86 and x64?
- How to prevent GCC from optimizing out a busy wait loop?
- What is the instruction that gives branchless FP min and max on x86?
- What’s missing/sub-optimal in this memcpy implementation?
- Efficient 4×4 matrix vector multiplication with SSE: horizontal add and dot product – what’s the point?
- What is the fastest way to convert float to int on x86
- How many GCC optimization levels are there?
- Why doesn’t GCC optimize structs?
- Compute fast log base 2 ceiling
- How to concatenate two integers in C
- Why is memcmp so much faster than a for loop check?
- How to optimize these loops (with compiler optimization disabled)?
- C for loop indexing: is forward-indexing faster in new CPUs?
- Are constant C expressions evaluated at compile time or at runtime?
- Very fast memcpy for image processing?
- Faster approach to checking for an all-zero buffer in C?
- What’s the proper implementation for hardware emulation?
- Inline function v. Macro in C — What’s the Overhead (Memory/Speed)?
- Produce loops without cmp instruction in GCC
- Bit popcount for large buffer, with Core 2 CPU (SSSE3)
- clang 14.0.0 floating point optimizations
- Query on -ffunction-section & -fdata-sections options of gcc