Foreign + Vectors - benchmarks for copying and swapping
Radosław Smogura
mail at smogura.eu
Thu Jun 17 00:15:49 UTC 2021
Hi all,
I could not stop my self, from this simple experiment of glueing together foreign with vectors, at least via byte buffers for now.
Results are not the best, but still could be interesting, as there was some interest with this.
Below please find results, and the link to benchmark:
Benchmark Mode Cnt Score Error Units
VectorCopySegments.copyWithNative avgt 10 20.987 ? 1.819 ns/op
VectorCopySegments.copyWithNativeShared avgt 10 12.528 ? 0.183 ns/op
VectorCopySegments.copyWithNativeToArray avgt 10 19.800 ? 3.985 ns/op
VectorCopySegments.copyWithVector avgt 10 31.151 ? 1.929 ns/op
VectorCopySegments.copyWithVectorShared avgt 10 56.752 ? 1.754 ns/op
VectorCopySegments.copyWithVectorShuffle avgt 10 52.409 ? 0.390 ns/op
VectorCopySegments.copyWithVectorToArray avgt 10 29.573 ? 0.485 ns/op
https://github.com/rsmogura/panama-foreign/blob/foreign_and_vectors/test/micro/org/openjdk/bench/jdk/incubator/foreign/VectorCopySegments.java
Feedback is welcome.
Kind regards,
Rado
More information about the panama-dev
mailing list