Yesterday me and some friends from the university ...
# random
y
Yesterday me and some friends from the university did the Google HashCode 2018 challenge. We wrote the code in python. Today I converted the code to Kotlin, keeping the same algorithm. The python code took 130 seconds to run. The kotlin code took ~880ms.
K 12
👍 5
👍🏻 4
n
can you share the code?
3
y
https://gist.github.com/yoavst/aeb99f764988b59e5f760b8eca20ab86 `original.py`is the original one,
copy.kt
is the converted version,
optimized.kt
is an optimized version with less objects and better performance (~700ms)
r
in Java will be the same