There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:a poorly designed algorithm will always be slower than a well designed one, regardless of what language it was originally written in or compiled to.
Alexey Bezrodnov wrote:Java performance can be increased many times if we can optimize our code down to the machine level...
Winston Gutkowski wrote:And if you need that level of optimization, YOU'RE USING THE WRONG LANGUAGE.
Richard Tookey wrote:Given all this then why would I use your 'booster' ?
Alexey Bezrodnov wrote:
Richard Tookey wrote:Given all this then why would I use your 'booster' ?
Your experience was with C vs Java comparison, or more correctly, C compiler vs JIT comparison. But optimization techniques are much wider than only high level language tricks. Low level allows you to use hardware caches effectively, with it you can use a combination of instructions, that, most probable, all compilers just unable to reproduce. Often you have an option of high level algorithm optimization, which is not available to any existing compiler.
If in your experience was no extensive assembly level optimizations, then even if you had a look at a decompiled code, it doesn't mean there is no more options to make it faster. For more insight into the optimization techniques this document is a good starting point for those, who knows basics of assembly.
Alexey Bezrodnov wrote:Well, then you just haven't worked in the areas, where performance is very important. So, it is better to let performance hungry developers to have new tool, instead of talking them into another language. And, by the way, claiming that Java is wrong language from the efficiency point of view, is not very exciting action.
Richard Tookey wrote:As far as I can see there is nothing in your 'booster' that automatically makes use of the sort of optimisation tricks in this document so it is down to developers to spend major effort in applying these micro optimisations for what at best will be most probably be micro rewards.
Richard Tookey wrote:Unless you can provide concrete examples of the use of your 'booster' providing a significant performance increase then I personally will dismiss your 'booster' as snake oil.
Winston Gutkowski wrote:but I stand by the statement. If performance is the ONLY (or overriding) benchmark you are interested in, then you should choose a language that allows you to tweak to your heart's delight.
Alexey Bezrodnov wrote:
Richard Tookey wrote:As far as I can see there is nothing in your 'booster' that automatically makes use of the sort of optimisation tricks in this document so it is down to developers to spend major effort in applying these micro optimisations for what at best will be most probably be micro rewards.
But do you think a JVM "automatically makes use of the sort of optimisation tricks in this document"? Unfortunately very often it is not. So, it is almost always the developer's responsibility to manage the quality of his code. If you want to get better performance, then you should spend some time optimizing your program. But if you feel that the default performance goes well, then, of course, you can forget about any optimization. However, there are many areas, where default performance just sucks and a developer should make some search for a better algorithm with better hardware utilization.
Alexey Bezrodnov wrote:
Richard Tookey wrote:Unless you can provide concrete examples of the use of your 'booster' providing a significant performance increase then I personally will dismiss your 'booster' as snake oil.
It seems you haven't read even a short list of chapter references from the link in the first post. There is a link to the chapter about performance testing.
Alexey Bezrodnov wrote:There is A LOT of projects, where performance is very important. And price for it is measured in human-years. So, if your project has no hard performance requirements, then it is possible to go without any optimization. But there are high load servers in the world, they service millions of requests per minute and the performance is very important for the owners of the servers.
As you can see, such situation just draws a line between an ordinary web site with 100-1000 visitors per day and performance hungry systems. The last area is the target for the performance booster.
Richard Tookey wrote:Your apparent definition of quality seem to be directly at odds with mine. In my definition as a minimum code quality comes down to - does it meet the design requirements, is it maintainable and would any further speed improvement be worth the cost of obtaining it? Yours seems to be - does it get every ounce of performance from the processor regardless of whether it needs every ounce of performance regardless of the ease of maintenance and regardless of whether or not it takes far longer to write and so costs more money?
Richard Tookey wrote:You provide a table of performance figures but I don't see a link to the code used to provide those figures either on the page or in the distribution so we are unable to either verify the figures or to comment on your implementation. Am I missing something?
Winston Gutkowski wrote:then you'll build the server according to the performance you need, and that will likely involve choices about hardware and firmware (I was a system builder for several years, so I do know something about this). Simply choosing stuff such as multi-core processors, more memory, higher speed network cards, faster/newer OS, or even something as simple as an SSD are likely to make far more difference to the overall performance of your system than a "language booster".
Winston Gutkowski wrote:Also: Hardware upgrades are likely to be MUCH cheaper and more flexible than putting all your eggs in one "booster" basket
Winston Gutkowski wrote:I highly doubt that any "booster" could give you much more than a 10-20% improvement. An few extra gig of memory OTOH....Fifty bucks. Sorted.
Tim Driven Development | Test until the fear goes away
Alexey Bezrodnov wrote:Of course, it is possible to grow a server farm, but at some point just electricity cost will push you to the brink of bankruptcy.
Tim Cooke wrote:Do you have some examples of some resource intensive algorithms written in plain Java and written with your booster what would serve as an example that we could try at home?
Winston Gutkowski wrote:
Alexey Bezrodnov wrote:Of course, it is possible to grow a server farm, but at some point just electricity cost will push you to the brink of bankruptcy.
And your single-language "booster" is going to solve that?
Winston Gutkowski wrote:My worry is that your solution is too targeted because it only deals with ONE of the hundreds of possible bottlenecks that can occur in a system
Alexey Bezrodnov wrote:It is important to calculate matrices in real life, but is it a viable example for you?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Alexey Bezrodnov wrote:There is an example in the project that you can download.
Tim Driven Development | Test until the fear goes away
Winston Gutkowski wrote:But then you might get into localization issues, which linked lists are not so wonderful with; unless maybe the structure is superimposed on top of an array...
Winston Gutkowski wrote:Optimization takes all sorts of forms, and a generalized "let's optimize the bytecode" (or the machine code generated from bytecode) one doesn't strike me as particularly revolutionary - and a new version of the Java compiler might well plug some of the inefficiencies that obviously bother you anyway.
Winston Gutkowski wrote:I say, good luck. And I mean it - it's possible that you're "seeing" something that old codgers like me just can't due to my background; but I'll need to see a lot more before I concede that you've created a "better mousetrap".
Tim Cooke wrote:could you pick one algorithm as an example and post the code for implementing it in plain Java, and the code for implementing it using your booster?
Tim Cooke wrote:Including the benchmark results that you have observed with your example would be most welcome too.
Alexey Bezrodnov wrote:The place for optimization is simple - if your application hits 100% processor load and the performance is still not very promising, then it's time to use the Machine Level Java.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Alexey Bezrodnov wrote:Oh, come on! The benchmarks are just waiting for your click!
Tim Driven Development | Test until the fear goes away
Winston Gutkowski wrote:I'd be careful about statements like that. If your app hits hits 100% processor load for long periods and the performance is still not very promising, then it might be time to try your "java booster".
Tim Cooke wrote:Do those two snips of code perform the same operation?
Tim Cooke wrote:Also, the Java one doesn't make sense as it appears to be incomplete. Variables 'n', 'as1', and 'as2' are undefined.
Tim Cooke wrote:It would be great to see a full example where you show two functionally identical methods, and you show the performance statistics for each.
Tim Cooke wrote:I'm encouraging you to show off your project and performance claims by publishing your findings in a format that others can replicate for themselves.
Alexey Bezrodnov wrote:May be a better shot will be like this - just think carefully about your application and it's algorithm.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Henry Wong wrote:BTW, is this a general purpose optimizer? Meaning it will optimize anything written in Java?
Tim Driven Development | Test until the fear goes away
Tim Cooke wrote:
It's a very niche area and not for general purpose programming (because the readability is horrid). The only way I could imagine it being used would be if I were writing some library where performance was paramount and I would be hiding the gnarly implementation away behind a nice interface. I would liken the use of this library to using the Unsafe class.
Winston Gutkowski wrote:And as long as you can guarantee three things:
1. That it will NEVER work any slower.
2. That I don't need to change ANY of my code to use your "booster".
3. That it will ALWAYS work in multi-threaded situations.
then I can't see any particular reason not to use it.
Henry Wong wrote:is this a general purpose optimizer? Meaning it will optimize anything written in Java?
Tim Cooke wrote:The only way I could imagine it being used would be if I were writing some library where performance was paramount and I would be hiding the gnarly implementation away behind a nice interface.
Richard Tookey wrote:But one has to ask the question - why not just use JNI ?
Richard Tookey wrote:I have not used assembler in JNI but as far as I can see there is nothing to stop one using it as long as one obeys the JNI protocol.
Richard Tookey wrote:The biggest problem I see with the 'booster' is selling it as a performance booster when it just seems to me to be a (simpler ?) way of interfacing with assembler.
Tim Driven Development | Test until the fear goes away
Tim Cooke wrote:Alexey, do you think your technology would be suitable for writing a very high throughput, non blocking, queue?
Tim Driven Development | Test until the fear goes away
Tim Cooke wrote: I don't think so Henry.
As far as I can make out, it's a framework to allow you to write assembler in your Java app. It's that 'down to the bone', 'close to the hardware' type of programming that professes to have superior performance characteristics. If you know what you're doing, of course.
Richard Tookey wrote:
But one has to ask the question - why not just use JNI ? I have not used assembler in JNI but as far as I can see there is nothing to stop one using it as long as one obeys the JNI protocol.
The biggest problem I see with the 'booster' is selling it as a performance booster when it just seems to me to be a (simpler ?) way of interfacing with assembler.
Alexey Bezrodnov wrote:
It will optimize anything written in Java if a developer is ready to optimize anything written in Java. So, because a developer is a general enough "device", then this optimizer can be seen as general, as a developer is.
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|