This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiler Optimisation

 
Shiveen Pandita
Greenhorn
Posts: 25
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been really informative to read everyone's replies. Yes I finally found it's some compiler optimization for the "if(Boolean)... " construct, otherwise compiler would have warned me that local variable has not been initialised.

One last thing though would be great to know...

are there any more such compiler optimization's that java uses to loop around such discrepancies.
 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
novice retard wrote:are there any more such compiler optimization's that java uses to loop around such discrepancies.

You can search if you want to know more about the code optimization(some example of it are as following) by the compiler:
1). Loop Optimization2). Dead code elimination
and many more...
 
Shiveen Pandita
Greenhorn
Posts: 25
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Gaurangkumar khalasi
@Campbell Ritchie
@Okti Wmcijewski

thanks.. you were great help. I'll be posting more questions.

I hope that all you guys will share your knowledge next time also like this.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shiveen Pandita wrote:It's been really informative to read everyone's replies.
You’re welcome
Yes I finally found it's some compiler optimization . . .

are there any more such compiler optimization's that java uses to loop around such discrepancies.
Most optimisation is actually carried out by the runtime, particularly if it finds the same code being executed repreately (I think ≥10000×).

Since the topic of this discussion has changed and looks very interesting, I am going to split part of this thread into a new thread and call it “Compiler Optimisation” or similar
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread split from this old thread, where anybody wanting to see the earlier discussion can look.
 
Gaurangkumar Khalasi
Ranch Hand
Posts: 187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shiveen Pandita wrote:thanks.. you were great help. I'll be posting more questions.

You are welcome
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic