Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, but TFA begins with a discussion of benchmarking methods and it would just take some copy and pasting to figure out if you're right.

Edit: I tested it and there is a difference

I picked the example you mentioned, defined the regex constant as "s" and the line constant as "asas", increased the iteration count from 10^4 to 10^6 to make the difference more noticable (got no noticable difference w/o that change) and measured the programs with time in Termux on my Nexus 5.

Real time for fast: 3.150, real time for slow: 3.623. Times average of three runs ("time python fast|slow.py"). I ran once with same setup and threw out results before the runs.

Edit2: actually you mentioned a different example, my bad. I didn't measure any others because vim with a touchscreen keyboard is a PITA, no idea if the one you referring is true.



Edit3: times in seconds




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: