Why is java code significantly faster than C# on leetcode?


  • 0
    S

    What I mean is when you convert the java code into c# with exactly the same logic, C# runtime is way slower than java's runtime; and this almost is always true so don't think it's the randomness of which server executes a solution at a particular time. Their syntax is very very similar, sometimes you can even just copy a java solution which will also work as a C# solution. They're both virtural languages so the difference shouldn't be that big.

    It would be interesting to know why...


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.