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
Benchmark Mode Thr Count Sec Mean Mean error Units | |
b.NextEventLoopBenchmark.existingNext16 thrpt 1 100 1 0.387 0.001 ops/ms | |
b.NextEventLoopBenchmark.existingNext19 thrpt 1 100 1 0.386 0.002 ops/ms | |
b.NextEventLoopBenchmark.newNext16 thrpt 1 100 1 0.828 0.003 ops/ms | |
b.NextEventLoopBenchmark.newNext8 thrpt 1 100 1 0.828 0.003 ops/ms | |
b.NextEventLoopBenchmark.newNext19 thrpt 1 100 1 0.371 0.002 ops/ms | |
b.NextEventLoopBenchmark.newNext9 thrpt 1 100 1 0.371 0.002 ops/ms |
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
Benchmark Mode Thr Count Sec Mean Mean error Units | |
b.NextEventLoopBenchmark.newNext16 thrpt 1 200 1 8.562 0.006 ops/ms | |
b.NextEventLoopBenchmark.newNext19 thrpt 1 200 1 8.500 0.005 ops/ms | |
b.NextEventLoopBenchmark.newNext8 thrpt 1 200 1 8.567 0.007 ops/ms | |
b.NextEventLoopBenchmark.newNext9 thrpt 1 200 1 8.434 0.007 ops/ms | |
b.NextEventLoopBenchmark.existingNext16 thrpt 1 200 1 8.485 0.005 ops/ms | |
b.NextEventLoopBenchmark.existingNext19 thrpt 1 200 1 8.506 0.003 ops/ms |
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 benchmark; | |
import org.openjdk.jmh.annotations.GenerateMicroBenchmark; | |
import java.util.concurrent.atomic.AtomicInteger; | |
public class NextEventLoopBenchmark { | |
@GenerateMicroBenchmark | |
public void newNext8 () { |
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
static class Node | |
{ | |
int val; | |
Node left; | |
Node right; | |
Node(int val, Node left, Node right) | |
{ | |
this.val = val; | |
this.left = left; |
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
{-WETT-} | |
perms :: [Char] -> [[Char]] | |
perms [] = [""] | |
perms xs = reverse $ sort $ nub [x:y | x <- xs, y <- perms $ delete x xs] | |
{-TTEW-} |
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
wordsOfLength :: [Char] -> Integer -> [[Char]] | |
wordsOfLength alphabet n | n <= 0 = [""] | |
| otherwise = [a:b | a <- alphabet, b <- wordsOfLength alphabet (n-1)] |
NewerOlder