2472
Comment: put MSG under Writing:
|
2533
small update
|
Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
* why is read slower than iter? |
|
Line 23: | Line 25: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_read.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_read.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_read.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_read.jpg] |
Line 31: | Line 33: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_iter.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_iter.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_iter.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_iter.jpg] |
Line 39: | Line 41: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline.jpg] |
Line 47: | Line 49: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline_with_tell.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline_with_tell.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline_with_tell.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline_with_tell.jpg] |
Line 54: | Line 56: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readlines.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readlines.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readlines.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readlines.jpg] |
Line 71: | Line 73: |
http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_write.jpg | [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_write.jpg] |
Line 78: | Line 80: |
http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_writelines.jpg http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_writelines.jpg |
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_writelines.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_writelines.jpg] |
Some PyFile benchmarks, mostly to show off the PyFile nio rewrite
Tests done on FreeBSD 6.2-RELEASE, Java 1.5.0_13 in server mode and Python 2.5.1
(If anyone's worried about FreeBSD Java, the times are in line with OS X's Java 1.5)
Preparations: 100 Iterations: 5
Notes:
* jython's file iter is roughly equivalent to its readline, whereas CPython's readline is not as optimized as its iter
* The few anomalies in the smaller benchmarks are probably due to hotspot kicking in. Ideally we would run more preparations
* why is read slower than iter?
Reading:
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_read.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_read.jpg]
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_iter.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_iter.jpg]
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline.jpg]
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readline_with_tell.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readline_with_tell.jpg]
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_readlines.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_readlines.jpg]
Writing:
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_write.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_write.jpg]
[http://underboss.org/~pjenvey/jython/pyfile-nio/small/test_writelines.jpg] [http://underboss.org/~pjenvey/jython/pyfile-nio/big/test_writelines.jpg]