Is there any performance difference between i++ and ++i in a for loop in C? Let’s know! Prerequisites For the examples I used FreeBSD 12.1-RELEASE-p2 and its default C compiler (clang) version 8.0.1 Let’s go! Let’s write a simple code for the postfix increment: Compile it: cc -O0 inc.c, and then use objdump(1) to disassemble... » read more
I created the GitHub repo to save for our descendants the code written by Dennis Ritchie using GitHub Archive Program. At least, I hope so. I found it on Dennis Ritchie’s home page in Bell Labs.
Now I reading the greatest book “FreeBSD device drivers” by Joseph Kong. The book covers FreeBSD version 8, but now versions 12.1, 12.0 and 11.3 are actual (I use the version 12.1) and some code aren’t compile. For example, the pointless driver (section “Implementing sysctls, Part 1”, chapter 3 on page 41). Because I testing... » read more