Jump to content

Java 7 What`s New, Performance Benchmark 1.5 1.6 1.7


Kràtos

Recommended Posts

Ive searched what new on the Java 7 betwen the other version 5 or 6 T.T

 

I found interesting things  ;)

 

I think we will pown off servers x]

 

And the Result The Winner is … Java 7

 

Java 5 <=== 18% faster=== < Java 6 < ===46% faster===< Java 7

 

The Theory and Practical

 

As far as what changes you’ll see in your day-to-day work, my guess is that the major impact will be stuff like JSR 203 which overhauls the file system API. If JSR 310 is included, then it would also have a major impact on how you interact with any aspect of the date and time APIs. Many of the other JSRs will only impact you if you happen to already do something in that particular area (JMX – JSR 255, concurrency – JSR 166, etc).

 

The biggest thing most people will notice may be performance. This is my favorite. And that is exactly what I thought about writing, and it expanded the scope to features aswell. As usual, each JDK brings a whole new set of performance optimizations. We’ve already seen some very encouraging results in String performance, array performance, and a new concurrent garbage collector (G1). I suspect many people will find that their existing code will work and run noticeably faster than it did in the past.

 

Performance

 

I saw this one about the new features in Java 7:

 

http://www.ibm.com/developerworks/java/library/j-jtp03048.html

 

They use MergeSort as an example of how to exploit multiple CPUs for sorting. Java 7 has the nice feature, that it can now decide at runtime, how many threads should be used to solve a particular problem (see the coInvoke part).

 

However, there is this tricky constant, SEQUENTIAL_THRESHOLD, which is used to decide whether to enforce sequential processing or not. How do you set this value? Well, you set it at design time, even though the example was meant to show how Java adapts at runtime…

 

The next thing is that the whole array is passed as parameter. No matter what programming language you use, this is a bad design. If Java doesn’t copy the memory, you may have 2 CPUs looking at the same RAM area. If Java has a runtime optimization that detects that 2 CPUs are looking at the same area, and decides to copy the data, it will copy too much data…

 

I’m not sure this example would perform better on a 4-CPU machine than on a single-CPU machine with the same CPUs…

 

The basic problem in all this is, that it is extremely hard to find real world examples of parallelization of algorithms that can be optimized to any kind of parallel hardware. Good multi-threading must be done on a functionality level, not on the algorithm level.

 

Also, every time we add multi-threading to code, we make it more complex. In other words, it comes at a cost. I predict that some of the future performance gains don’t come from making algorithms more threaded, but from changing data structures, reducing memory footprint and simple optimizations. As the price of more performance increases, efforts will be spent where most speed can be gained at the lowest price.

 

Benchmarking JDK 7

 

As per Sun, The JDK 7 delivers quite a speed boost over JDK 6 array accesses. For us, this is huge. It’s like another year and a half of Moore’s law for free. Only in software. And you don’t even have to write multi-threaded code.

 

It’s basically a stress test that I used for ArrayLists, HashMaps, gets, array sets, and simple multiply-add-subtract, arithmetic, and concurrency APIs, Threads.

 

I installed the following beta release of JDK 7:

 

> java -version

java version "1.7.0-ea"

Java SE Runtime Environment (build 1.7.0-ea-b66)

Java HotSpot Client VM (build 16.0-b06, mixed mode, sharing)

 

Java has always suffered relative to C/C++ in  matrix multiplication because Java does range checks on every array access (set or get). With some clever static and run-time analysis, we are able to eliminate most of the array bounds checks. They show on matrix benchmarks that this one improvement doubles the speed of the LU matrix factorization benchmark in the U.S. National Institute of Standards (NIST) benchmark suite SciMark 2, which like our clustering algorithm, is basically just a stress test for array access and arithmetic.

 

I’m pretty excited about the new fork-join concurrency, too, as it’s just what we’ll need to parallelize the inner loops without too much work for us or the operating system.

 

I decided to take my on Test-check for performance for Java 7 and then compare it with 5, 6.

 

My tests have been on a Dell D630 Notebook running Windows 7 RTM (32 bit) with an Intel Core 2 CPU (2.4GHz), and 3GB of RAM.

 

Here are the Benchmark Tests -

 

Test 1. Add 5 Million String values (each calculated with some complex Math arithmetic)

 

Test 2. ArrayList <String> with 5 Million insertions (with values from Test1). Insertions are conditional and have additional computation before adding to array.

 

Test 3. HashMap <String, Integer> with 5 million keys, values. Each key, value pair is being calculated via concurrent thread. (This tread tests both Arithmetic and concurrency capabilities)

 

Test 4. Printing 5 million items of ArrayList <String> to number of Files (1000) and Reading back again. (Tests multicore concurrency to the edge) My CPU, HDD, RAM all went to Max.

 

All of these tests were very memory intensive. Heap size varied between 1 – 2 GB during tests, due to large no. of objects. CPU Utilization was sometimes 50% (1 core’s max) and most of the time >70% and in Test3, Test4; CPU touched 100% most of the times.

 

The Result is mind blowing!

 

Source: http://www.taranfx.com/java-7-whats-new-performance-benchmark-1-5-1-6-1-7

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Witchit ESP | Cheat | Affordable ✅ Windows 10 & 11 supported ✅ Compatible with all Windows versions ✅ Works with AMD & Intel processors ✅ internal software Boost Your Game Visibility – Get Witchit ESP Now! https://witchitcheat.mysellix.io/
    • yes this is if the editor and map files do not match
    • How do I make class buffs look like this and have the same dynamics as a skill toggle? Example in the Rage skill image, I would like to activate and deactivate it as a skill toggle and have the same appearance. Solved. I needed to modify the values to make them the same as a skill toggle.
    • A message from Faytas, the player who got banned for revealing the "petition" screenshot:   So week ago i posted picture in discord of player Arab talking with Lithuanian admin Tony aka Mindaugas Cekavičius the main head of server l2Damage.com i saved picture it wasnt mine made so i posted it in discord just to let people realise that some players is under admins back i’ll post that picture and here it was an interesting picture player FatherOfDamage aka Arab was crying to admin to boost his classes in olympiad and admin was easily doing that and still doing till this day… after i posted that picture admin banned me in discord and two accounts ingame, dc-ingame nick was Faytas, then someone of my discord friends made more posts about corrupted admin Mindaugas Cekavičius at more forums/sites and guess what i instantly got ss in discord chat that player Arab saying that was me that posting more shit on other sites like maxcheaters,l2j i got also the screenshots of all that guy posts he did but i”ll not post his name couse he may get banned too couse he said truth as i did, then in about 2-3 days i took friends acc and named it iFaytas and clan member made a joke in hero voice “ban Faytas” so immidiatly i got banned again! ban says im banned couse i pretend as other player then he changed it that i used illigal software, after that i logged box to talk with him why i got banned he was standing in town so i asked him and he was ignoring me and all other people who asked why he banned me, and guess what? once again i got banned so in total i got banned 4 accounts for no reason just couse i posted picture of illigal things that admin doing and helping other players, by the way a month ago i was spamming that player arab like i always do just to make fun of him and that guy ciuldn’t handle the spam so he asked Tony to jail me and he jailed me for 120min being in jail i asked why and he unjailed me instantly xD i dont care anymore about this server and won’t play there couse he is helping other people/boosting theyr classes in olympiad lol im posting that special picture bellow… after 4 free bans i could’t do nothing just to post it everywhere couse that pissed me off that people getting bans for telling the truth!   https://ibb.co/GsMFfwx   https://ibb.co/nfsPwZP https://ibb.co/zRNH0yd
  • Topics

×
×
  • Create New...