¡@

Home 

python Programming Glossary: delta_sec

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

sys count 0 start time.time for line in sys.stdin count 1 delta_sec int time.time start_time if delta_sec 0 lines_per_sec int round.. in sys.stdin count 1 delta_sec int time.time start_time if delta_sec 0 lines_per_sec int round count delta_sec print Read 0 n lines.. start_time if delta_sec 0 lines_per_sec int round count delta_sec print Read 0 n lines in 1 n seconds. LPS 2 n .format count delta_sec..

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

dummy None for line in sys.stdin dummy line.split count 1 delta_sec int time.time start_time print Python Saw 0 lines in 1 seconds... print Python Saw 0 lines in 1 seconds. .format count delta_sec end '' if delta_sec 0 lps int count delta_sec print Crunch Speed.. 0 lines in 1 seconds. .format count delta_sec end '' if delta_sec 0 lps int count delta_sec print Crunch Speed 0 .format lps else..