Long vs long in Java

Правка en2, от safarisoul, 2016-01-14 07:38:38

Intuitively, long as primitive type should be faster in case of multiplication or other arithmetic operations than Long as object type. However, my recent submissions to a CF problem 439B - Devu, the Dumb Guy disproved this intuition.

15307785 using long, the primitive type got TLE, whilst 15307798 using Long, the object type got Accepted, and has a large timely improvement over the previous one by like 10 times.

Does anyone have any idea why this happened?

Теги java, sort

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский safarisoul 2016-01-21 14:05:14 73 Tiny change: ' happened?' -> ' happened?\n\nHere is another problem :[problem:285C]'
en2 Английский safarisoul 2016-01-14 07:38:38 10
en1 Английский safarisoul 2016-01-14 07:36:01 508 Initial revision (published)