On 2017-05-23 01:03, Nikolay Nikolov wrote:
Isn't java just a wrapper around C?
No. Java compilers generate code for a virtual machine, called JVM (Java
Virtual Machine). They do not generate code for x86 CPUs or any other
> ...snip...
Very nice explanation and detailed information.
x87 FPU instructions. Sounds so great, you're going to ask if there are
any disadvantages to this approach? And, of course, there are - since
the program is essentially recompiled every time the user runs it,
starting Java programs take a long time.
Technically correct, but you make it sound much worse than it really is.
Here Eclipse IDE starts up just as fast as Lazarus IDE. And Eclipse is
easily 10x or more bigger than Lazarus (when it comes to features). So
JIT does a pretty damn good job if you ask me.
Also JIT has improved tremendously over the last few years. In speed,
performance and optimisations. I have read somewhere that now it does a
[quick] compile to get your application up and running faster, then
after your app is running it can recompile some classes with even more
optimisations, and runtime reload those classes used by your
application. All done auto-magically in the background. ;-)
be a lot slower than a FPC program. I know comparing different IDEs is a
little apples-to-oranges comparison (because they may have different
features and vastly different implementation details), but compare the
speed of e.g. Lazarus to any IDE, written in Java, even the fastest one. :)
Lets just look at the two most popular Java IDEs - Eclipse and Intellij
IDEA. When they are running I don't experience any speed difference
comparing them to some native non-Java application of similar size.
It is also worth noting that both Eclipse and Intellij IDEA does a ton
more than Lazarus IDE. They both do deep code-analysis while you are
coding, making suggestions on how you can improve your code, can apply
those improvements with a single click or keyboard shortcut, have
extremely impressive refactoring functionality that makes Lazarus look
like Notepad. And the list goes on and on.
Lazarus is good, but it doesn't hold a candle against what Eclipse or
Entellij IDEA can [and does] do. Yes, yes, I know they have 100's or
1000's more developers too, and corporate backing. So making a
comparison between those IDE's and Lazarus is rather insane.
Always measure and try to understand why something is slow. In 99% of
the cases it's not what people initially think.
Indeed. I've learned a lot in the recent discussions, and I'm glad to
see the FPC team seem to be making some effort in improving the compiler
optimisation, instead of simply dismissing my work and comments.
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-other maillist - fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other