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
upper_bound With binary_function Visual Studio 2008 Bug?
Code
boost::asyc fail with error C2280: attempting to reference a deleted function
pitch errors verification for Nowhk
Wide string conversion with multibyte chars
empty base bug
Regex success
throwing std::function on MSVC is dangerous
Project
1