Skip to content
Snippets Groups Projects
Commit 41a2d7fe authored by Fabio Zahner's avatar Fabio Zahner
Browse files

a3 v2

parent b4e815bf
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ public class LockFreeStack<T> {
// Thread.yield() for pop and push results in about 1.5 seconds of improvement
// onSpinWait instead of yield results in about the same times as without yield(), so slower than yield() by about 1.3 seconds
// using updateandGet or getandupdate is slower. we are not sure why, but it might just be that lambdas are less efficient with how they are processed internally?
// using updateandGet or getandupdate is slower than any other alternative we tested. we are not sure why, but it might just be that lambdas are less efficient with how they are processed internally?
public void push(T value) {
top.updateAndGet(current -> new Node<>(value, current));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment