M
M
mitaichik2017-12-15 18:39:11
Java
mitaichik, 2017-12-15 18:39:11

Does IDEA optimize the application on startup?

Hello! We need to do a little performance test.
For example, I want to find out the iteration time over an array for a huge number of objects. At the same time stupidly launching the application from IDEA.
I understand correctly that if I create an empty loop, the compiler will cut it out and the test will not be relevant.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2017-12-15
@mitaichik

IDEA is a development environment in which a compiler is built in, which is usually separate from, for example, Oracle. The development environment itself does not optimize anything, but the main optimization is done by a virtual machine, the compiler of which can optimize, including empty loops, but when you run your bytecode. I'm not sure how it is now, but before it was possible to tell the virtual machine whether or not to optimize.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question