Skip to content

Instantly share code, notes, and snippets.

View wololock's full-sized avatar
🈷️
https://e.printstacktrace.blog

Szymon Stepniak wololock

🈷️
https://e.printstacktrace.blog
View GitHub Profile
final class WaitTest {
public static void main(String[] args) {
new WaitTest().run();
}
void run() {
class Closure {
void call() {
try {
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
import groovy.lang.Binding;
import groovy.lang.Script;
import org.codehaus.groovy.runtime.BytecodeInterface8;
import org.codehaus.groovy.runtime.InvokerHelper;
import org.codehaus.groovy.runtime.callsite.CallSite;
@wololock
wololock / jmh.log
Created November 12, 2018 09:48
Benchmarking Groovy tail-recursive functions with JMH
10:34:35: Executing tasks 'clean jmh'...
> Task :clean
> Task :compileJava
> Task :compileGroovy
> Task :processResources NO-SOURCE
> Task :classes
> Task :compileTestJava NO-SOURCE
> Task :compileTestGroovy NO-SOURCE
> Task :processTestResources NO-SOURCE
[
{
"name": "org.codehaus.groovy.runtime.dgm$0",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true
},
{
"name": "org.codehaus.groovy.runtime.dgm$1",
@wololock
wololock / java_jmh.log
Created October 2, 2018 17:54
Java collection iteration benchmark results (JMH)
18:15:58: Executing task 'jmh'...
:compileJava NO-SOURCE
:compileGroovy NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:compileTestJava NO-SOURCE
:compileTestGroovy NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
@wololock
wololock / static_groovy_10k_jmh.log
Created October 2, 2018 17:51
Static Groovy collection iteration benchmark result for 10k collection size (JMH)
18:49:37: Executing task 'jmh'...
:compileJava NO-SOURCE
:compileGroovy NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:compileTestJava NO-SOURCE
:compileTestGroovy NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
@wololock
wololock / static_groovy_jmh.log
Created October 2, 2018 17:47
Static Groovy collection iteration benchmark results (JMH)
18:15:58: Executing task 'jmh'...
:compileJava NO-SOURCE
:compileGroovy NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:compileTestJava NO-SOURCE
:compileTestGroovy NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE
@wololock
wololock / dynamic_groovy_jmh.log
Created October 2, 2018 17:41
Dynamic Groovy collection iteration benchmark (JMH)
19:09:10: Executing task 'jmh'...
:compileJava NO-SOURCE
:compileGroovy NO-SOURCE
:processResources NO-SOURCE
:classes UP-TO-DATE
:compileTestJava NO-SOURCE
:compileTestGroovy NO-SOURCE
:processTestResources NO-SOURCE
:testClasses UP-TO-DATE

Keybase proof

I hereby claim:

  • I am wololock on github.
  • I am wololock (https://keybase.io/wololock) on keybase.
  • I have a public key whose fingerprint is 1055 963A 5C4A C4E7 CBC2 EF7A 5C2D A2D8 B19D C04A

To claim this, I am signing this object:

@wololock
wololock / gist:18eedc30426e36a6a995
Created February 11, 2015 05:33
Jackson + Joda-Time parsing example
@Grab(group='joda-time', module='joda-time', version='2.7')
@Grab(group='com.fasterxml.jackson.datatype', module='jackson-datatype-joda', version='2.5.1')
import groovy.transform.EqualsAndHashCode
import org.joda.time.DateTime
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.datatype.joda.JodaModule
import com.fasterxml.jackson.core.type.TypeReference
@EqualsAndHashCode