Java is Slow Revisited 자바가 느리 수정
There is a minor-war going on in Sun Alumni mailing list and elsewhere where the common misconception: “Java is slow” is surfacing again and again, much to the dismay of knowledgeable Java developers who have known for ages that Java is fast even compared to C++ and has been so for several years. - 전쟁이 벌어지고있다는 세부 사항과 다른 위치에 태양 졸업생 메일링리스트에 일반적인 오해 : "자바의 속도가 느리다"는 표면 다시 또 다시, 정도의 지식을 낙담하는 자바 개발자들은 자바가 빠른 심지어는 나이에 비해 알려져 c + +과가 최근에 너무을 몇 년 동안합니다. All this re-surfaced because Sun decided to 태양이 모든 결정을 위해 다시 - 표면 처리 change its ticker symbol to JAVA 주식 시세 기호를 변화시킬 자바 (previously it was SUNW). (이전에는 그것이 sunw). All of this is terribly frustrating to Java developers who take pride in Java and are well aware of its capabilities because they leverage it every day. 이것은 매우 실망스러운의 모든에 자부심을 자바 개발자들은 자바와도 잘 알고있습니다 활용할 그것 때문에 매일 매일의 기능을합니다. So let’s rest this myth to rest once and for all, shall we? 자, 이제는 휴식이 한번에 휴식이 신화의 모든, 그럴까요?
Myth 1: Java is Interpreted language and so it must be slow 신화 1 : 언어 및 때문에 자바로 해석되어야합니다 느린
Java is currently just-in-time-compiled by the JVM (Java virtual machine). 자바는 현재 -에 - 시간 - 컴파일하는 단지 jvm (자바 가상 머신). Just-in-time-compilation gives it equivalent performance to compiled applications, sometimes better. -이 - 시간 - 편집 앨범 단지 그것 동급의 성능을 제공 컴파일된 애플 리케이션, 때로는 더 나은합니다. Sun’s JIT is not the only one either. 태양의 jit이 중 하나는 유일한 사람이 아니합니다. IBM and others provide their implementation of JVM with just-in-time-compilation too. 귀하와 다른 사람의 구현을 제공 jvm -이 - 시간 - 편집 앨범만으로도 너무합니다.
You can also compile Java programs in native executables with free compilers like gcj ( http://gcc.gnu.org/java/ ) or paid ones like Excelsior JET ( http://www.xlsoft.com/en/products/jet/index.html ). 자바 프로그램의 실행 파일을 컴파일 네이티브 수있습니다 컴파일러와 같은 무료 gcj (http://gcc.gnu.org/java/)이나 유료 엑셀 같은 것들 제트 (http://www.xlsoft.com/en/products/jet / index.html).
Java’s slowness is not intrinsic, that is an architectural mis-conception as demonstrated above. 자바의 느림은 본질적인, 즉 위의 건축과 관리 정보 체계 - 개념을 증명합니다. But wait there’s more.. 하지만 잠깐이 더 많은 것 ..
Java versus C++ Benchmarks 자바 대 c + + 벤치 마크
Let’s look at some benchmarks comparing Java with C++. 일부 벤치 마크를 살펴 봅시다 자바와 c + +을 비교합니다.
Performance of Java versus C++ by JPLewis and Ulrich Neumann from Computer Graphics and Immersive Technology Lab, University of Southern California c + +로 자바 대 jplewis의 성능과 울리히 노이만 컴퓨터 그래픽과 몰입 기술 연구소, 남부 캘리포니아 대학
http://www.idiom.com/~zilla/Computer/javaCbenchmark.html http://www.idiom.com/ ~ zilla / 컴퓨터 / javacbenchmark.html
This article from 2003 finds “This article surveys a number of benchmarks and finds that Java performance on numerical code is comparable to that of C++ , with hints that Java’s relative performance is continuing to improve. 이 기사는 2003 년 발견 "이 문서를 찾아 설문 조사 수많은 자바의 성능을 벤치 마크와 비교가의 숫자 코드는 c + +, 자바의 상대적인 성능이와 힌트를 지속적으로 개선을합니다. We then describe clear theoretical reasons why these benchmark results should be expected.” 그러면 저희가 이러한 벤치 마크 결과를 설명 지우기 이론적인 이유를 기대해야합니다. "
I would like to quote even further as they gave a detailed explanation about the slowness myth of Java and dispels it thoroughly: 를 인용 싶습니다에 대한 상세한 설명을 더욱로 그들이 준 자바와 dispels 그것에 대해서 철저하게 느림의 신화 :
Conclusions: Why is “Java is Slow” so Popular? 결론 : 이유는 무엇입니까 "자바가 느려진다"그래서 인기가?
Java is now nearly equal to (or faster than) C++ on low-level and numeric benchmarks. 자바는 현재 거의 같음 (또는보다) c + +를 사용 낮은 - 수준 및 숫자 벤치 마크합니다. This should not be surprising: Java is a compiled language (albeit JIT compiled). 이것은 놀라운되지 않습니다 : 자바는 컴파일 언어 (으로나마 jit 컴파일).
Nevertheless, the idea that “java is slow” is widely believed. 그럼에도 불구하고, 아이디어를 "자바가 느려진다"는 광범위하게 생각합니다. Why this is so is perhaps the most interesting aspect of this article. 왜이 너무은 아마이 문서의 가장 흥미로운 측면합니다.
Let’s look at several possible reasons: 여러 가지 이유를 살펴 봅시다 :
* Java circa 1995 was slow. * 자바 대진 1995 년 느린합니다. The first incarnations of java did not java a JIT compiler, and hence were bytecode interpreted (like Python for example). 첫 번째 화신 자바와 자바의 jit 않았 컴파일러를, 그리고 따라서 해석이 바이트 코드 (예 : 파이썬 예를 들면). JIT compilers appeared in JVMs from Microsoft, Symantec, and in Sun’s java1.2. 컴파일러를 jit의 JVM에서 등장 마이크로 소프트, 시만텍, 그리고 태양의 java1.2합니다.
This explanation is implausible. 이 설명은 할 것 같지 않다. Most “computer folk” are able to rattle off the exact speed in GHz of the latest processors, and they track this information as it changes each month (and have done so for years). 대부분의 "컴퓨터 포크"는 떨어지지 수의 정확한 속도를 ghz의 최신 프로세서, 그리고 그들이 정보를 추적 매월로 변경 (그리고는 이렇게 몇 년 동안). Yet this explanation asks us to believe that they are not able to remember that a single and rather important language speed change occurred in 1996. 아직이 설명을 요구하는 그들은 우리에게 믿을 수없는 언어를 기억하는 단일 및 더 중요하다 1996 년에 속도 변화가 발생했습니다.
* Java can be slow still. * 자바는 느린 여전히합니다. For example, programs written with the thread-safe Vector class are necessarily slower (on a single processor at least) than those written with the equivalent thread-unsafe ArrayList class. 예를 들면, 프로그램을 스레드 - 안전하게 벡터로 작성된 클래스는 반드시 느린 (단일 프로세서 적어도)보다 서면과 이에 상응하는 arraylist 클래스 스레드 - 안전하지 않을 수있습니다.
This explanation is equally unsatisfying, because C++ and other languages have similar “abstraction penalties”. 이 설명은 동등하게스럽지, 왜냐하면 c + +와 다른 프로그래밍 언어가 유사 "추상화 처벌"합니다. For example, The Kernighan and Pike book The Practice of Programming has a table with the following entries, describing the performance of several implementations of a text processing program: 예를 들어, 파이크 커니핸하고 실천을 예약의 테이블은 다음과 같은 항목을 프로그래밍, 기술의 성능을 구현의 여러 텍스트 처리 프로그램 :
Version 400 MHz PII 버전 400 mhz pii
C 0.30 sec c 0.30 초
C++/STL/deque 11.2 sec c + + / stl / 11.2 초 deque
C++/STL/list 1.5 sec c + + / stl /리스트 1.5 초Another evidently well known problem in C++ is the overhead of returning an object from a function (several unnecessary object create/copy/destruct cycles are involved). 또 다른 분명한 잘 알려진 문제에 c + +은 오버헤드가에서 개체를 반환하는 함수 (일부 불필요한 개체 만들기 / 복사 / 파괴주기가 포함).
* Java program startup is slow. * 자바 프로그램을 부팅이 느려진다. As a java program starts, it unzips the java libraries and compiles parts of itself, so an interactive program can be sluggish for the first couple seconds of use. 로서 자바 프로그램을 시작하면 그 자체 unzips the 자바 라이브러리와 컴파일 부분, 그래서 대화형 프로그램이 처음 몇 초 동안 부진을 사용합니다.
This approaches being a reasonable explanation for the speed myth. 이 접근법의 속도가 신화의 합리적인 설명을합니다. But while it might explain user’s impressions, it does not explain why many programmers (who can easily understand the idea of an interpreted program being compiled) share the belief. 그러나 설명해 줄 수 있을지도 사용자의 노출, 많은 프로그래머 이유를 설명하지 않습니다 (사람의 생각이 이해하기 쉽게 해석된 프로그램이 컴파일) 신앙을 공유합니다.
Two of the most interesting observations regarding this issue are that: 이 문제와 관련해 2 개의 관측의 가장 재미있는 점은 :
1. there is a similar “garbage collection is slow” myth that persists despite decades of evidence to the contrary, and 이 같은 "쓰레기 수집이 느려진다"신화, 그 증거를 수 십 년간의 지속에도 불구하고 그 반대, 그리고
2. 두합니다. that in web flame wars, people are happy to discuss their speed impressions for many pages without ever referring to actual data. 웹 불꽃이 전쟁, 사람들은 그들의 행복을 논의하지 않고도 많은 페이지를 참조하는 속도의 노출을 실제 데이터합니다.Together these suggest that it is possible that no amount of data will alter peoples’ beliefs, and that in actuality these “speed beliefs” probably have little to do with java, garbage collection, or the otherwise stated subject. Our answer probably lies somewhere in sociology or psychology. 함께 이러한 제안하는 것은 양의 데이터를 변경할 수없습니다 사람들의 신앙, 그리고 실제로는 이러한 "스피드 신념"아마가 거의 상관이 자바, 쓰레기 수집, 또는 명시 제목합니다. 우리의 해답 아마 어딘가에 거짓말 사회학이나 심리학합니다. Programmers, despite their professed appreciation of logical thought, are not immune to a kind of mythology, though these particular “myths” are arbitrary and relatively harmless. 프로그래머, 감사의 공언에도 불구하고 그들의 논리적인 생각, 일종의 신화는 면역이되어, 비록 이러한 특정 "신화"는 임의의와 상대적으로 무해한합니다.
Here is another benchmark on Java versus C++ 여기에 또 다른 벤치 마크는 자바 대 c + +
The Java is Faster than C++ Benchmark the 자바는 c + + 벤치 마크보다 빨리
http://www.kano.net/javabench/
This was also quoted in JDJ magazine article: http://java.sys-con.com/read/45250.htm 이것은 또한에서 인용 jdj 잡지 기사 : http://java.sys-con.com/read/45250.htm
“I used G++ (GCC) 3.3.1 20030930 (with glibc 2.3.2-98) for the C++, with the -O2 flag (for both i386 and i686). "나 사용 g + + (gcc) 3.3.1 20030930 (glibc 2.3.2-98)에 c + +,에 - 산소 플래그 (i386와 i686 둘 다). I compiled the Java code normally with the Sun Java 1.4.2_01 compiler, and ran it with the Sun 1.4.2_01 JVM. 나는 the 자바 코드를 정상적으로 컴파일된 자바 1.4.2_01 컴파일러와 태양, 그리고 그것을 실행 태양 1.4.2_01 jvm합니다. I ran the tests on Red Hat Linux 9 / Fedora Test1 with the 2.4.20-20.9 kernel on a T30 laptop. 에 대한 테스트를 달릴 때 나는 레드햇 리눅스 9 / 중절모 t30 휴대용 퍼스널 컴퓨터를 test1 커널 2.4.20-20.9으로합니다. The laptop has a Pentium 4 mobile chip, 512MB of memory, a sort of slow disk. 노트북은 펜티엄 4 모바일 칩, 5백12메가바이트 메모리, 일종의 느린 디스크를합니다.
The results I got were that Java is significantly faster than optimized C++ in many cases. “ 그 결과에 따르면, 자바이 크게 난 c + +보다 빨리 최적화된 경우가 많다. "
“ JVM startup time was included in these results. "jvm 시동 시간은 이러한 결과에 포함합니다. That means even with JVM startup time, Java is still faster than C++ in many of these tests. “ 즉, 시작 시간 jvm에도 불구하고, 자바는 여전히 많은 이들보다 빨리 c + +에서 테스트를합니다. "
BTW: The article also links to lots of other benchmarks at the end. btw :이 기사는 또한 많은 다른 링크를 벤치 마크 끝에합니다.
Hopefully I have finally laid rest to the myth of “ java is slow “. 아마 나는 휴식을 마지막으로 짜여진의 신화 "자바가 느려진다". It is a perception, a blatantly false perception, not a reality. 그것은 인식을 노골적 잘못된 인식이 아닌 현실을합니다. Get over it. 화푸실합니다.
Filed under 밑에 Headline News 헤드 라인 뉴스 , J2EE J2 쥶 E , Java Software 자바 소프트웨어 , Programming 프로그래밍 | |
| |
RSS 2.0 rss 2.0 | |
Trackback 트랙백 this Article | 이 문서 |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |





August 26th, 2007 at 5:52 am 2007년 8월 26일에서 오전 5시 52분
Maybe you haven’t had to deploy an EAR to Weblogic and call just a simple JSP. 아마도 당신은 귀를 weblogic을 배포하는가 없었던하여 전화를 간단하게 jsp합니다. You would understand easily why some developers think Java is slow… 왜 일부의 개발자들이 생각을 이해하기 쉽게 자바가 느리…
August 26th, 2007 at 10:02 am 2007년 8월 26일에서 오전 10시 2분
Weblogic is slow, has been slow for ages. weblogic이 저하되었습니다 한참 느린합니다. There is a good reason why they don’t allow any performance tests of their application server. 이 사람 참 좋은 이유는 그들이 허용하지 않는 응용 프로그램 서버의 모든 성능 테스트합니다. However that doesn’t affect Java’s performance. 그러나이 자바의 성능에 영향을 미치지 않습니다. Try running a simple jsp on tomcat. tomcat을 실행하는 간단한 jsp 시도합니다. It is lightning fast. 그것은 번개 빠른합니다.
August 26th, 2007 at 9:39 pm 2007년 8월 26일에서 오후 9시 39분
I wrote a similar piece in my blog a few months ago which ended-up being in the Java Developers Journal as well, but I thought you’d find it somewhat relevant and interesting: 나는 내 블로그에 쓴 몇 개월 전에 유사한 작품이 끝났다 -을있다는 사실이 자바 개발자 저널도,하지만 어느 정도 찾았다고 생각하는데 관련성이 높고 흥미로운 : Correcting Logical Fallacies: Why Java Is Not Slow 논리적인 오류 정정 : 왜 자바가 느린
September 25th, 2007 at 10:06 pm 2007년 9월 25일에서 오후 10시 6분
Thanks for the link. 링크를 주셔서 감사합니다.