¡@

Home 

python Programming Glossary: test_lines_double

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

times to eliminate disk caching confound. usr bin time cat test_lines_double . readline_test_cpp 33.30 real 0.04 user 0.74 sys Saw 20000001.. lines in 33 seconds. Crunch speed 606060 usr bin time cat test_lines_double . readline_test_cpp1b 3.79 real 0.01 user 0.50 sys Saw 20000000.. lines in 4 seconds. Crunch speed 5000000 usr bin time cat test_lines_double . readline_test.py 6.88 real 0.01 user 0.38 sys Read 20000000..

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

foo.bar 127.0.0.1 home.foo.bar Results usr bin time cat test_lines_double . split.py 15.61 real 0.01 user 0.38 sys Python Saw 20000000.. lines in 15 seconds. Crunch Speed 1333333 usr bin time cat test_lines_double . split1 23.50 real 0.01 user 0.46 sys C Saw 20000000 lines.. lines in 23 seconds. Crunch speed 869565 usr bin time cat test_lines_double . split2 44.69 real 0.02 user 0.62 sys C Saw 20000000 lines..