Closed pengisgood closed 3 years ago
Just curious about the lock with the empty byte array, what's the benefit of an empty byte array compare to Object?
Object
https://github.com/WeBankFinTech/Linkis/blob/4ac1a51f25d5ea451d90e59294d0c6227c124147/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/LoopArrayQueue.scala#L27
I also found a post on StackOverflow which is relevant. Mostly discussed from the byte code and serialization perspective.
Does it really matter with performance?
Any ideas from the author(probably is @enjoyyin) of this line of code?
Hello, this is just a habit of using locks, it has no special meaning
Just curious about the lock with the empty byte array, what's the benefit of an empty byte array compare to
Object
?https://github.com/WeBankFinTech/Linkis/blob/4ac1a51f25d5ea451d90e59294d0c6227c124147/core/scheduler/src/main/scala/com/webank/wedatasphere/linkis/scheduler/queue/LoopArrayQueue.scala#L27
I also found a post on StackOverflow which is relevant. Mostly discussed from the byte code and serialization perspective.
Does it really matter with performance?
Any ideas from the author(probably is @enjoyyin) of this line of code?