Skip to content

Conversation

@thebehera
Copy link
Contributor

Summary

  • Override readFloat, getFloat, writeFloat, readDouble, getDouble, writeDouble in both JVM and Android implementations
  • Use direct ByteBuffer methods instead of going through Int/Long conversion with Float.fromBits/Double.fromBits

Changes

  • src/jvmMain/kotlin/com/ditchoom/buffer/BaseJvmBuffer.kt
  • src/androidMain/kotlin/com/ditchoom/buffer/BaseJvmBuffer.kt

Test plan

  • JVM tests pass
  • ktlint passes

Override readFloat, getFloat, writeFloat, readDouble, getDouble, writeDouble
to use direct ByteBuffer methods instead of going through Int/Long conversion
with Float.fromBits/Double.fromBits.
@thebehera thebehera merged commit 6b8de2e into main Dec 20, 2025
4 checks passed
@thebehera thebehera deleted the fix/jvm-float-double-optimization branch December 20, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants