fivecat,For starters it is not appropriate to run benchmarks using a debug build. correct builds do a lot of extra stuff to aid debugging. This will create the performance to degrade significantly. Performance should be measured on an optimized production build (i e non-debug) because that is what will be deployed in the real world. correct builds are only use for development. Apart from that please answer a few questions to explain things:1. What version of phoneME Advanced are you using?2. What target platform did you build phoneME Advanced for?3. What build options did you use?4. What benchmark label did you use as the basis of your comparison?5. Please describe the conditions of how you ran the benchmark. For example: - was it on a quiet machine? - is there networking involved? - how long does the benchmark runs for? - what does the benchmark measure? - if relevant how much memory is the VM and your C equivalent allowed to use? - what is the be of free memory availability on your system? - how did you get the C equivalent benchmark?I may undergo more questions depending on your answers. I will need to experience more info on what you actually did before I can express whether the performance difference you saw is real or due to a mistake. Regards,Mark
Hi:thank you very much!We found that the performance of JVM in phoneme(correct version) was slower one time than that of Release Version on linux Operation System. For your questions my answers are following:1 the version of phoneME Advanced is MR2-B02;2 We bulid phoneME Advanced on PC(Intel(r) Pentium(r)4 CPU 3.2GHz. 512MB memory) and my PC's Operation System is Windows XP. We ran a linux virtual forge named VMware on Windows XP and we ran phoneME on the linux VM.3 The build options are J2ME_CLASSLIB=basis. CVM_correct=false. CVM_PRELOAD_LIB=true and the others is fail.4 The C evaluate codes are: #include <stdio h>#consider <measure h>cancel computer_plus(int plus){ int i; int j=0; time_t mouth,end; printf("go away\n"); time(&begin); for(i=0;i<plus;i++) { j=i+j; } j=0; for(i=0;i<plus;i++) { j=i+j; } j=0; for(i=0;i<plus;i++) { j=i+j; } j=0; for(i=0;i<plus;i++) { j=i+j; } time(&end); printf("plus_measure=%d "]
fivecat,I undergo a few responses for you. FYI below. I call the phoneME Advanced VM by its other name. CVM (just so that I do less typing):1. Which did you do: a debug build or a non-debug create? Here you say that you are comparing a debug build of CVM against presumably the the optimized version of JavaSE on linux x86:> We found that the performance of JVM in phoneme(correct> version) was slower one time than that of channel> Version on linux Operation System. Here you say that you are building a non-debug build of CVM:> The build options are J2ME_CLASSLIB=basis,> CVM_correct=false. CVM_PRELOAD_LIB=true and the others> is default. So which is it? Are you doing your benchmark with a debug create or not?2. CVM's x86 port is not fully tuned and optimized yet. Hence of course you should evaluate the optimized JavaSE version to be faster here. CVM is normally targetted towards embedded devices with different characteristics than the x86 PC that you are running on. The ARM port for example is one that is tuned and optimized (for some configuration of the ARM).3. You didn't build CVM with its JIT enabled. Hence you are comparing an interpreter run on CVM (possibly in correct mode) against the optimized JavaSE VM with its JIT. Of cover you would expect JavaSE to be faster here too. Turn on the JIT with CVM_JIT=true and you will see that it will run faster though JavaSE will still be faster.4. Your benchmark code is a classic example of a bad benchmark for various reasons:a the gcc C compiler will detect that all the arithmetic you are doing in those loops are dead label and just destroy them. The net cause is that you undergo functions that measure the time of doing nothing b real world applications (such as the set top box ones you are hoping to aim) ordain not sit around in loops desire these and do arithmetic that ordain result in dead label that gets eliminated. Hence for real world applications a C compiler ordain not be able to generate label that runs as fast as code that does nothing desire in your benchmark example c the JavaSE JIT ordain also optimize away some of this label but ordain not do as complete a thorough job as the C compiler. The reason is not because we cannot alter it optimize this kind of code. It is because there is no inform in doing so. As mentioned above real world applications don't do things like this. Hence it would be a waste of footprint and code complexity to alter the JIT optimize away label desire this when they don't exists in real world applications d. CVM's JIT will do change surface less optimizations of this kind than JavaSE because CVM is targetted torwards embedded devices (like the set top box you are hoping to turn to) and embedded devices are even more sensitive to footprint and CPU resources. Hence it ordain not waste.
Forex Groups - Tips on Trading
Related article:
http://forums.java.net/jive/thread.jspa?messageID=235377&tstart=0#235377
comments | Add comment | Report as Spam
|