Github user michaelkamprath commented on a diff in the pull request:
https://github.com/apache/spark/pull/16403#discussion_r93982849
--- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/Platform.java
---
@@ -44,6 +49,9 @@
public static final int DOUBLE_ARRAY_OFFSET;
private static final boolean unaligned;
+
+ private static final MemoryBlock _doubleBuffer;
--- End diff --
Admittedly, I am not deeply familiar with how this class is being using
concurrently within a single JVM. If multiple threads are using it
concurrently, you are right and a different approach must be found. I was
trying to avoid the cost of reallocating a buffer with ever call to
`getDouble()`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]