This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import one.util.streamex.MoreCollectors; | |
import one.util.streamex.StreamEx; | |
import java.util.stream.Collector; | |
class Test { | |
enum MyLattice { | |
/* | |
TOP | |
/ \ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
public class MemoryTest { | |
public static void main(String[] args) { | |
var processors = new ArrayList<Processor>(); | |
for (int i = 0; i < 1000; i++) { | |
int[] data = new int[10_000_000]; | |
processors.add(new Processor(data) { | |
@Override | |
int calculate() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/java.base/share/classes/java/lang/AbstractStringBuilder.java | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java | |
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java (revision 674fa32cf8403ceec84bbe2c3f9404d612c10797) | |
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java (date 1674682743075) | |
@@ -1680,8 +1680,8 @@ | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.IntSupplier; | |
import java.util.stream.IntStream; | |
public class Benchmark { | |
private int compute() { | |
IntSupplier s1 = () -> IntStream.range(0, 10000).map(v -> 1).sum(); | |
IntSupplier s2 = () -> IntStream.range(0, 10000).map(v -> 1).sum(); | |
IntSupplier s3 = () -> IntStream.range(0, 10000).map(v -> 1).sum(); | |
return s1.getAsInt() + s2.getAsInt() + s3.getAsInt(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import org.openjdk.jmh.annotations.*; | |
import org.openjdk.jmh.runner.Runner; | |
import org.openjdk.jmh.runner.RunnerException; | |
import org.openjdk.jmh.runner.options.Options; | |
import org.openjdk.jmh.runner.options.OptionsBuilder; | |
import java.util.ArrayList; | |
import java.util.List; |
OlderNewer