Open moo24 opened 4 months ago
Hi,
Is there a specific reason why you used the AtomicX classes? An old version of the Java implementation had them and let's say just that I am glad that we got that part completely re-written.
Thank you for the hint. I created the first implemenation some time ago, but never got to contribute it to this project. I now refactored it to also remove the atomic.* references. A nice side effect - the code performance improved.
Fixed the missing commit sign-off.
Kotlin implementation of Flexible Polyline encoding based on Java implementation. API wise, I implemented the Dart API as I prefer that one.
Note: There are currently still dependencies to java.util.concurrent.atomic which should be replaced with kotlin.native.concurrent or a project like https://github.com/Kotlin/kotlinx-atomicfu in case the code shall be used with a kotlin multiplatform project.
Tests are passing. Performance on JVM seems worse (about 4x) than pure Java implementation; so there is room for improvement. However, intention is to provide a kotlin implementation in case someone needs it (e.g. for Kotlin native projects).