3 ms·
I think the author should probably use some C++ <algorithm>'s in lines 241 and later, avoiding raw loops and making the code clearer. Also, yeah, it's not 284
by einpoklum 4y ago
I think the author should probably use some C++ <algorithm>'s in lines 241 and later, avoiding raw loops and making the code clearer.
Also, yeah, it's not 284 lines of C++ by any stretch of the imagination, but the main file is pretty readable, which is nice.
- fxtentacle 4y agoI just used the Linux CLOC on the C++ files that I wrote. Yes, I didn't count my 3 dependencies KenLM, Wave, or TensorFlow, because those are used by pretty much all speech recognition projects. For comparing the complexity of my code to Mozilla's DeepSpeech, it makes sense to ignore the LOCs for shared dependencies.
- einpoklum 4y agoIt was a cute gimmick for the title, nm. But you should try to avoid raw loops in favor of established iteration patterns / standard library algorithms. I found this talk on the subject by Sean Parent to be educational: https://www.youtube.com/watch?v=qH6sSOr-yk8 https://www.youtube.com/watch?v=qH6sSOr-yk8
- fxtentacle 4y agoThanks for sharing the talk :)
- deleted 4y ago[deleted]