Long vs long in Java Arrays.sort()
Difference between en2 and en3, changed 73 character(s)
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 [problem:439B] disproved this intuition.↵

[submission:15307785] using long, the primitive type got TLE, whilst [submission: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?


Here is another problem :[problem:285C]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English safarisoul 2016-01-21 14:05:14 73 Tiny change: ' happened?' -> ' happened?\n\nHere is another problem :[problem:285C]'
en2 English safarisoul 2016-01-14 07:38:38 10
en1 English safarisoul 2016-01-14 07:36:01 508 Initial revision (published)