Skip to content

Instantly share code, notes, and snippets.

@karl82
karl82 / .gitconfig
Last active September 22, 2016 20:19
.gitconfig
[core]
editor = vim
autocrlf = input
[color]
status = auto
[merge]
tool = vimdiff
[push]
default = simple
[alias]
package cz.rank.spring;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
import java.util.Date;
/**
* Created by karl on 7/30/15.
*/
@karl82
karl82 / SynchronizationTest1
Created October 9, 2013 08:24
F:\>java -version<br> java version "1.6.0_06"<br> Java(TM) SE Runtime Environment (build 1.6.0_06-b02)<br> Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)<br> <br> SynchronizationTest1:<br> client<br> Cumulative time for testX(): 51,702,940 ns<br> Cumulative time for testY(): 616,381,691 ns<br> Cumulative time for testZ(): 619,2…
/**
* Jednoduchy benchmark pro porovnani rychlostnich
* rozdilu mezi pouzitim synchronizovanych metod
* a synchronizovanych bloku.
*/
public class SynchronizationTest1 {
// dostatecny pocet iteraci pro spusteni JITu
private final static int ITERATIONS = 5000000;
// zamezime tomu, aby se do casu behu benchmarku