¡@

Home 

c++ Programming Glossary: crunch

Why is reading lines from stdin much slower in C++ than Python?

http://stackoverflow.com/questions/9371238/why-is-reading-lines-from-stdin-much-slower-in-c-than-python

lines in sec seconds. if sec 0 lps line_count sec cerr Crunch speed lps endl else cerr endl return 0 Compiled with g O3 o.. . readline_test_cpp Saw 5570000 lines in 9 seconds. Crunch speed 618889 cat test_lines . readline_test.py Read 5570000.. 20 21 29 28 EST 2012 CPP Saw 5570001 lines in 9 seconds. Crunch speed 618889 Python Read 5 570 000 lines in 1 seconds. LPS 5..

Why is splitting a string slower in C++ than Python?

http://stackoverflow.com/questions/9378500/why-is-splitting-a-string-slower-in-c-than-python

end '' if delta_sec 0 lps int count delta_sec print Crunch Speed 0 .format lps else print '' C Code #include iostream .. count lines in sec seconds. if sec 0 lps count sec cerr Crunch speed lps endl else cerr endl return 0 compiled with g Wall.. user 0.38 sys Python Saw 20000000 lines in 15 seconds. Crunch Speed 1333333 usr bin time cat test_lines_double . split1 23.50..