This file contains 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
hg clone http://hg.openjdk.java.net/lambda/lambda | |
cd lambda | |
sh get_source.sh | |
unset CLASSPATH | |
unset JAVA_HOME | |
unset LD_LIBRARY_PATH | |
env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin \ | |
LANG=C \ |
This file contains 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.Random; | |
public class Benchmark { | |
private static final int TOTAL = 100000000; | |
private static Random r = new Random(); | |
public static void main(String[] args) { | |
// Objects | |
Five five = new Five(); |
This file contains 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
reflected: 964 | |
indy: 663 | |
reflected: 927 | |
indy: 678 | |
reflected: 568 | |
indy: 308 | |
reflected: 571 | |
indy: 289 | |
reflected: 551 | |
indy: 293 |
This file contains 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
/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/Applications/Nika.1-IU-114.98.app/bin -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/ |
This file contains 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
/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 -Didea.launcher.bin.path=/Applications/Nika.1-IU-114.98.app/bin -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home/jre/ |
This file contains 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
Updated version with only methods no fields: | |
Indy | |
complex.html evaluations per millisecond: | |
Serial: 455 | |
Serial: 469 | |
Serial: 498 | |
Reflection | |
complex.html evaluations per millisecond: | |
Serial: 468 |
This file contains 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
<html> | |
<head> | |
<title>Markup Twitter Mentions</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://www.javarants.com/twitter-text-1.4.9.js"></script> | |
</head> | |
<body> | |
<div>This is a test of @kellen's idea.</div> | |
<div>Is this what you wanted @raffi?</div> | |
<div>by @sampullara :)</div> |
This file contains 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
super.mustache: | |
<div> | |
{{#list}} | |
<span>{{item}}</span> | |
{{/list}} | |
</div> | |
sub.mustache (not the same): | |
{{<super}} | |
{{#list}} |
This file contains 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
My proposal is a declarative syntax for defining replaceable blocks, very much akin to the | |
way this is done in Django and some other templating systems. Here is simple example: | |
super.mustache: | |
<html> | |
<head><title>{{$title}}Default title{{/title}}</title></head> | |
<body> | |
{{>navigation}} | |
<div class="content"> | |
{{$content}}Default content of the page{{/content}} |
This file contains 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
public class CERT2011_003 { | |
public static void main(String[] args) { | |
int i = 0; | |
String base = "\u0000"; | |
String s = base; | |
Map<String, Integer> map = new HashMap<String, Integer>(); | |
while (true) { | |
long start = System.currentTimeMillis(); | |
map.put(s, 0); | |
map.get(s); |