Skip to content
Snippets Groups Projects
Commit 641c8726 authored by Christian Wulf's avatar Christian Wulf
Browse files

added performance results

parent f627db0c
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,10 @@
8: 1200 ns (iterative; argument/return w/o pipe)
9: 9400 ns (executeWithPorts: queued pipe)
10: 4900 ns (executeWithPorts: single element pipe)
10: 5400 ns (executeWithPorts: single element pipe; with setReschedulable() after each read)
11: 7400 ns (executeWithPorts: fixed sized pipe)
11: 8600 ns (executeWithPorts: fixed sized pipe with CircularArray(int))
11: 8200 ns (executeWithPorts: fixed sized pipe with CircularArray(int) w/o mask)
11: 8600 ns (executeWithPorts: fixed sized pipe; with CircularArray(int))
11: 8200 ns (executeWithPorts: fixed sized pipe; with CircularArray(int) w/o mask)
11: 7800 ns (executeWithPorts: fixed sized pipe; with setReschedulable() after each read)
12: 3300 ns (recursive; argument/return w/o pipe)
13: 3300 ns (recursive; argument/return w/o pipe; w/o pipeline class)
......@@ -92,12 +92,14 @@ abstract class AbstractStage<I, O> implements StageWithPort<I, O> {
this.getOutputPort().send(element);
CommittableQueue execute;
// CommittableQueue execute;
do {
// execute = this.next().execute2(this.outputElements);
// execute = this.next().execute2(this.getOutputPort().pipe.getElements());
this.next().executeWithPorts();
} while (this.next().isReschedulable());
// } while (this.next().getInputPort().pipe.size() > 0);
// } while (execute.size() > 0);
}
......
......@@ -22,7 +22,7 @@ public abstract class ConsumerStage<I, O> extends AbstractStage<I, O> {
public void executeWithPorts() {
I element = this.getInputPort().receive();
this.setReschedulable(!this.getInputPort().pipe.isEmpty());
this.setReschedulable(this.getInputPort().pipe.size() > 0);
this.execute5(element);
......
......@@ -45,4 +45,9 @@ public class FixedSizedPipe<T> implements IPipe<T> {
// return this.elements.get(this.lastFreeIndex - 1);
}
@Override
public int size() {
return this.lastFreeIndex;
}
}
......@@ -8,6 +8,8 @@ public interface IPipe<T> {
public abstract boolean isEmpty();
public abstract int size();
public abstract T readLast();
}
......@@ -59,4 +59,9 @@ public class Pipe<T> implements IPipe<T> {
return this.elements;
}
@Override
public int size() {
return this.elements.size();
}
}
......@@ -24,7 +24,7 @@ public class SingleElementPipe<T> implements IPipe<T> {
@Override
public boolean isEmpty() {
return this.element != null;
return this.element == null;
}
@Override
......@@ -32,4 +32,9 @@ public class SingleElementPipe<T> implements IPipe<T> {
return this.element;
}
@Override
public int size() {
return (this.element == null) ? 0 : 1;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment