{"id":1000440,"date":"2007-03-12T18:04:23","date_gmt":"2007-03-12T23:04:23","guid":{"rendered":"http:\/\/www.elharo.com\/blog\/software-development\/2007\/03\/12\/another-reason-java-is-faster-than-c-maybe\/"},"modified":"2007-03-17T06:49:09","modified_gmt":"2007-03-17T11:49:09","slug":"another-reason-java-is-faster-than-c-maybe","status":"publish","type":"post","link":"https:\/\/www.elharo.com\/blog\/software-development\/java\/2007\/03\/12\/another-reason-java-is-faster-than-c-maybe\/","title":{"rendered":"Another Reason Java is Faster than C (maybe)"},"content":{"rendered":"<p>Paul S. R. Chisholm <a href=\"http:\/\/books.slashdot.org\/books\/07\/03\/12\/1623226.shtml\">points out<\/a> a new reason virtual machine based languages such as Java may sometimes outperform statically optimized languages such as C:<\/p>\n<blockquote cite=\"http:\/\/books.slashdot.org\/books\/07\/03\/12\/1623226.shtml\"><p>Portability depends on architecture (for example, x86 vs. PowerPC), but high performance depends on microarchitecture (for example, Pentium M vs. Athlon 64 X2). Today&#8217;s Core 2 chips have many high performance features missing from the 1993 original Pentiums. A good compiler like gcc can take advantage of those additional features. This is bad news if you&#8217;re using a binary Linux distribution, compiled to a lowest common denominator. It&#8217;s good news if you&#8217;re building and installing Linux from source, with something like Linux From Scratch or Gentoo\/Portage. It&#8217;s also good news for just-in-time compilers (think Java, .NET, and Mono); they&#8217;re compiling on the &#8220;target&#8221; machine, so they can generate code tailored for the machine&#8217;s exact microarchitecture. <\/p><\/blockquote>\n<p>This sounds plausible in theory. What I don&#8217;t know is whether Java takes advantage of this in practice. Has anyone looked at the JIT source code lately? Can anyone say whether it makes any microarchitecture-specific optimizations?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Paul S. R. Chisholm points out a new reason virtual machine based languages such as Java may sometimes outperform statically optimized languages such as C: Portability depends on architecture (for example, x86 vs. PowerPC), but high performance depends on microarchitecture (for example, Pentium M vs. Athlon 64 X2). Today&#8217;s Core 2 chips have many high [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,32],"tags":[410],"class_list":["post-1000440","post","type-post","status-publish","format-standard","hentry","category-c","category-java","tag-flash"],"_links":{"self":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/comments?post=1000440"}],"version-history":[{"count":0,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/posts\/1000440\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/media?parent=1000440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/categories?post=1000440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elharo.com\/blog\/wp-json\/wp\/v2\/tags?post=1000440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}