Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
msvc compile optimization demo...
/* author: ripeip msvc compiler optimization demo */ #include <iostream> #include <cstdint> std::uint32_t const&& fast_idiv_by50(std::uint32_t const&& ecx) { constexpr std::uint32_t&& eax = 0x51EB851F; std::uint32_t edx = (static_cast<std::uint64_t>(ecx) * static_cast<std::uint64_t>(eax) >> 32); edx = (edx >> 4); std::int32_t b_edx = edx; edx = (edx >> 0x1f); return b_edx + edx; } int main() { std::cout << reinterpret_cast<void*>(fast_idiv_by50(0x50000)) << "\n"; }
run
|
edit
|
history
|
help
0
Matrix_1
MSVC_example_fscanf_s_and_chars_wchars
ADL of operator expression & unqualified function call
My Window
"Mostly invalid states" and unordered_set
vc++ bug?
hangman
UINT64 to UINT truncation
parameter pack workaround
du