rewrote my C neural network lib in C++, here's some random stats if ur curious!! EXACT same logical basics, C++ is just a lil more OOP of course

C - ~250 LOC
C++ - ~200 LOC

150k iterations avg time:
C - 540ms
C++ - 750ms

1.5m iterations avg time:
C - 3300ms
C++ - 4900ms

Follow

the deeper in both dimensions the network is, the faster that C compares to C++, one test with the structure (2,10,10,10,10,1) approximating XOR:
C++ - avg 9500ms
C - avg 2000ms

almost a 5x speedup for a teeny change! just think that's interesting

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
RaRuRe

It's pronounced ʁaʁyʁe. And written RaRuRe, or R3 for short.
You can find more infos on this place by clicking there.