General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Low Level
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "i dove down the 7z rabbit hole (it goes deep)" video.
I should just write everything myself. Far too much software violates basic principles of good code. For starters, signed bytes, and really by default using signed integers at all, that's a big no no. While I don't ascribe to the rigidity of most who tout DRY, I do feel like rewriting memcpy but doing it incorrectly is a bad move. If you're going to write a loop like that, and why would you, at least check the length somewhere before you start modifying it. But in all honesty, you get faster code to use an index into the arrays instead of modifying two pointers and a length variable.
1