Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeeTime
Kieker-TeeTime-Stages
Commits
17da2cfd
Commit
17da2cfd
authored
10 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
final static ArrayWrapper does not improve performance
parent
14d733bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/teetime/examples/throughput/methodcall/FixedSizedPipe.java
+28
-1
28 additions, 1 deletion
...eetime/examples/throughput/methodcall/FixedSizedPipe.java
with
28 additions
and
1 deletion
src/test/java/teetime/examples/throughput/methodcall/FixedSizedPipe.java
+
28
−
1
View file @
17da2cfd
...
...
@@ -2,8 +2,35 @@ package teetime.examples.throughput.methodcall;
public
class
FixedSizedPipe
<
T
>
implements
IPipe
<
T
>
{
// private static final class ArrayWrapper2<T> {
//
// private final T[] elements;
//
// // private int lastFreeIndex;
//
// @SuppressWarnings("unchecked")
// public ArrayWrapper2(final int initialCapacity) {
// super();
// this.elements = (T[]) new Object[initialCapacity];
// }
//
// public final T get(final int index) {
// return this.elements[index];
// }
//
// public final void put(final int index, final T element) {
// this.elements[index] = element;
// }
//
// public final int getCapacity() {
// return this.elements.length;
// }
//
// }
@SuppressWarnings
(
"unchecked"
)
private
final
T
[]
elements
=
(
T
[])
new
Object
[
4
];
// private final ArrayWrapper<T> elements = new ArrayWrapper<T>(2);
// private final ArrayWrapper
2
<T> elements = new ArrayWrapper
2
<T>(2);
private
int
lastFreeIndex
;
public
static
<
T
>
void
connect
(
final
OutputPort
<
T
>
sourcePort
,
final
InputPort
<
T
>
targetPort
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment