L
L
Leonid Fedotov2016-12-12 21:21:05
Java
Leonid Fedotov, 2016-12-12 21:21:05

How much does the speed depend on the type of data?

Do I understand correctly that more "simple" types, such as float, will increase the speed of the Big-data application, relative to the double-type? And if I have a cast from a double primitive to Double, will this also seriously affect the speed? Is double faster than Double?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2016-12-12
@iLeonidze

No, you don't understand correctly. It depends on the processor.
"cast" is a cast. In the case of double -> Double, this is called autoboxing, that is, automatic packaging of a primitive into an object. It's hard. If this happens all over the application, it can have a big impact on speed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question