Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "command line porn"
-
Here is another rather big example of how C++ is WAY slower than assembler (picture)
Sure - std::copy is convenient
but asm is just way faster.
This code should be compatible with EVERY x86_64 CPU.
I even do duffs device without having the loop:
the loop happens in the rep opcode which allows for prefetching (meaning that it doesnt destroy the prefetch queue and can even allow for preprocessing).
BTW: for those who commented on my comment porn last time: I made sure to satisfy your cravings ;-)
To those who can't make sense of my command line:
C++ 1m24s
ASM 19s
To those who tell me to call clang with -o<something>:
1) clang removes the call to copy on o3 or o2
2) the result isnt better in o1 (well... one second but that might be due to so many other things, and even if... one second isn't that much)25 -
So... Lots of rants about hacking.
Let me yell you a story...
Two decades ago I was asked to fix the school library computers and block then from using mIRC.
I cleaned all the machines, reinstalled the pirate copy of windows I was provided, blocked installing programs, blocked running of programs except the ones required (office, Netscape) and vnc in every computer, that I could access in a off-site computer.
Next day all the computers had mIRC... Just to show how kids are smart... Someone changed the MIRC.exe to iexplore.exe and that way could execute any program he wanted...
Invisible hard drive? Just use command line (so he could copy mIRC to a hidden folder)
Still, scared lots of kids, wen watching porn and a message would pop up , asking to not watch porn in school, but never couth the guy