9
votes
Accepted
Cross platform raw input handling in C/C++ for Linux and Windows
Use an existing terminal I/O library
Instead of reinventing the wheel and writing all this non-portable, low-level I/O code by hand, consider looking for already existing libraries that take care of ...
7
votes
Accepted
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
Latency analysis
The "generic" (not specific to any particular microarchitecture) latency analysis you did is not bad. There are some extra quirks though:
...
6
votes
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
CPUs are much more complex
Level 8: ret
You are looking at the instructions from the stand-alone functions, but those are never actually ...
4
votes
Small Virtual Machine executing its own byte-code
General Observations
The rules in the Code Review Community on Stack Exchange require that only code to be reviewed must be in the post, however, the only way to actually review the code in the ...
3
votes
Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count
This function is faster, but it crashes in the corner case where SHIFT_MASK == 0 because it loses the least significant bit. This issue can be resolved by zero ...
3
votes
Accepted
Linear System Solver using Gauss-Jordan Elimination
General Observations
Based on how long ago this was asked and how active you have been on the Code Review Community you probably know most of this already.
You might want to read up on negative zero, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
c++ × 9618c++11 × 1699
performance × 1084
beginner × 904
algorithm × 845
c++17 × 560
programming-challenge × 488
object-oriented × 484
c++14 × 468
template × 427
multithreading × 425
strings × 409
c++20 × 330
linked-list × 325
reinventing-the-wheel × 317
game × 305
template-meta-programming × 269
memory-management × 259
pointers × 256
vectors × 248
array × 220
time-limit-exceeded × 216
sorting × 195
recursion × 181
design-patterns × 178