Skip to content

Instantly share code, notes, and snippets.

package foo;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
import java.util.Scanner;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ConcurrentHashMap;
package net.tdowns;
import java.util.Arrays;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
package whatever;
import java.util.function.Supplier;
import org.apache.commons.lang3.concurrent.ConcurrentException;
import org.apache.commons.lang3.concurrent.LazyInitializer;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.CompilerControl;
import org.openjdk.jmh.annotations.CompilerControl.Mode;
import org.openjdk.jmh.annotations.Level;
; compile this like:
; nasm -f elf64 decode-test.s
default rel
BITS 64
GLOBAL _start
_start:
; iteration count, doesn't really matter much for the purposes of this test
mov rsi, 1_000_000
; compile this like:
; nasm -f elf64 decode-test.s
default rel
BITS 64
GLOBAL _start
_start:
; iteration count, doesn't really matter much for the purposes of this test
mov rsi, 1_000_000
// file Base.java
public class Base {
final void print() { System.out.println("base"); };
}
// file Derived.java
public class Derived extends Base {
@Override
void print() {
System.out.println("derived");
@travisdowns
travisdowns / dry.sh
Last active November 27, 2018 22:51
setup EC2 for development
git clone https://github.com/Keith-S-Thompson/dhrystone
cd dhrystone/v2.2
CFLAGS=-O3 sh dry.c
./dry2
#!/bin/bash
sudo apt update
sudo apt-get install -y build-essential unzip
git clone https://github.com/inikep/lzbench
cd lzbench
curl http://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip > silesia.zip
#!/bin/bash
LINUX=linux-4.19.5
set -e
set -x
if [ -z "$THREADS" ]; then
echo "set THREADS to the number of compilation threads"
exit 1
==========================================================================
== Memory bandwidth tests ==
== ==
== Note 1: 1MB = 1000000 bytes ==
== Note 2: Results for 'copy' tests show how many bytes can be ==
== copied per second (adding together read and writen ==
== bytes would have provided twice higher numbers) ==
== Note 3: 2-pass copy means that we are using a small temporary buffer ==
== to first fetch data into it, and only then write it to the ==
== destination (source -> L1 cache, L1 cache -> destination) ==