PDA

View Full Version : Java IO Faster Than NIO


sl4shd0t
07-27-2010, 10:14 PM
rsk writes "Paul Tyma, the man behind Mailinator, has put together an excellent performance analysis comparing old-school synchronous programming (java.io.*) to Java's asynchronous programming (java.nio.*) mdash; showing a consistent 25% performance deficiency with the asynchronous code. As it turns out, old-style blocking I/O with modern threading libraries like Linux NPTL and multi-core machines gives you idle-thread and non-contending thread management for an extremely low cost; less than it takes to switch-and-restore connection state constantly with a selector approach."pa href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fdevelopers.slashdot.org% 2Fstory%2F10%2F07%2F27%2F1925209%2FJava-IO-Faster-Than-NIO" target="_blank" title="Share on Facebook"img src="http://a.fsdn.com/sd/facebook_icon_large.png"/a a href="http://twitter.com/home?status=Java+IO+Faster+Than+NIO%3A+http%3A%2F% 2Fbit.ly%2FcM9cT5" target="_blank" title="Share on Twitter"img src="http://a.fsdn.com/sd/twitter_icon_large.png"/a/ppa href="http://developers.slashdot.org/story/10/07/27/1925209/Java-IO-Faster-Than-NIO?from=rss"Read more of this story/a at Slashdot./p pa href="http://feedads.g.doubleclick.net/~at/dF-zOtmVgCRKD55lWrS7pKeE6Jg/0/da"img src="http://feedads.g.doubleclick.net/~at/dF-zOtmVgCRKD55lWrS7pKeE6Jg/0/di" border="0" ismap="true"/img/abr/ a href="http://feedads.g.doubleclick.net/~at/dF-zOtmVgCRKD55lWrS7pKeE6Jg/1/da"img src="http://feedads.g.doubleclick.net/~at/dF-zOtmVgCRKD55lWrS7pKeE6Jg/1/di" border="0" ismap="true"/img/a/pimg src="http://feeds.feedburner.com/~r/Slashdot/slashdotDevelopers/~4/tnoNwPRSGqI" height="1" width="1"/

More... (http://rss.slashdot.org/~r/Slashdot/slashdotDevelopers/~3/tnoNwPRSGqI/Java-IO-Faster-Than-NIO)