Extremely high constant factors when working with floats?

Правка en1, от Qualified, 2020-09-22 23:04:31

Take a look at these two submissions

93514862, 93514890

The only difference between these two was that the data types for variables $$$n, k$$$, and vectors $$$a, hld1, hld2$$$. Instead of having them be long doubles, they were int. Now, look at the execution time! The difference is huge! The one with the ints has around 12 times better time than the one with long doubles! I knew that working with floats led to higher constant factors but didn't know that it would be that big.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Qualified 2020-09-22 23:04:31 561 Initial revision (published)