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 org.openjdk; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicLongFieldUpdater; | |
import org.openjdk.jmh.annotations.*; | |
import org.openjdk.jmh.infra.Blackhole; | |
/** | |
* <code> |
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
@BenchmarkMode(Mode.AverageTime) | |
@Warmup(iterations = 5) | |
@Measurement(iterations = 5) | |
@Fork(3) | |
@OutputTimeUnit(TimeUnit.NANOSECONDS) | |
@State(Scope.Benchmark) | |
public class MyBenchmark { | |
private static class TestActor extends UntypedActor { | |
@Override |
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
$ wget -6 keys.gnupg.net | |
--2014-07-30 16:27:36-- http://keys.gnupg.net/ | |
Resolving keys.gnupg.net (keys.gnupg.net)... 2001:41d0:8:44d7::1:1, 2001:610:1108:5011::70, 2001:6f8:1c3c:babe::62:1, ... | |
Connecting to keys.gnupg.net (keys.gnupg.net)|2001:41d0:8:44d7::1:1|:80... connected. | |
HTTP request sent, awaiting response... 301 Moved Permanently | |
Location: http://www.adeti.org/ [following] | |
--2014-07-30 16:27:36-- http://www.adeti.org/ | |
Resolving www.adeti.org (www.adeti.org)... 2001:41d0:8:44d7::1:1, 91.121.41.109 | |
$ wget -4 keys.gnupg.net |
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
### Keybase proof | |
I hereby claim: | |
* I am shipilev on github. | |
* I am shipilev (https://keybase.io/shipilev) on keybase. | |
* I have a public key whose fingerprint is 0190 82BC 00E0 324E 2AEF 4CF0 0D3B 3285 62A1 19A7 | |
To claim this, I am signing this object: |
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 code: | |
https://github.com/shipilev/article-exception-benchmarks | |
Prepare: | |
$ mvn clean install | |
Run: | |
$ java -jar target/microbenchmarks.jar ".*ThrowingStackless.*" -f 1 -wi 5 -i 5 -t ${THREADS} | |
On 2x12x2 Xeon, JDK 8 GA x86_64: |
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
$ acpitool -B | |
Battery #1 : present | |
Remaining capacity : 70810 mWh, 98.95%, 06:39:02 | |
Design capacity : 82620 mWh | |
Last full capacity : 71560 mWh, 86.61% of design capacity | |
Capacity loss : 13.39% | |
Present rate : 10647 mW | |
Charging state : Discharging | |
Battery type : Li-ion | |
Model number : 42T4710 |
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
$ bin/java -jar ~/projects/jol/jol-cli/target/jol-internals.jar java.lang.String | |
Running 64-bit HotSpot VM. | |
Using compressed references with 3-bit shift. | |
Objects are 8 bytes aligned. | |
Field sizes by type: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] | |
Array element sizes: 4, 1, 1, 2, 2, 4, 4, 8, 8 [bytes] | |
java.lang.String object internals: | |
OFFSET SIZE TYPE DESCRIPTION VALUE | |
0 4 (object header) 01 00 00 00 (0000 0001 0000 0000 0000 0000 0000 0000) |
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
SLOC Directory SLOC-by-Language (Sorted) | |
13427 jmh-core java=12043,xml=1384 | |
10436 jmh-core-it java=10254,xml=182 | |
3088 jmh-core-ct java=2996,xml=92 | |
1691 jmh-samples java=1589,xml=102 | |
1006 jmh-core-benchmarks java=887,xml=119 | |
745 jmh-archetypes xml=738,java=7 | |
671 jmh-generator-bytecode java=567,xml=104 | |
468 jmh-generator-annprocess java=397,xml=71 | |
409 jmh-generator-reflection java=337,xml=72 |
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
SLOC Directory SLOC-by-Language (Sorted) | |
3141572 jdk java=2218158,ansic=413685,xml=390872,cpp=87365,sh=17648, | |
objc=12653,awk=684,haskell=195,asm=157,cs=72,ruby=44,jsp=24,perl=12,csh=3 | |
789362 hotspot cpp=521039,java=237280,xml=16275,ansic=9670,asm=2774, | |
sh=2324 | |
273831 langtools java=271273,xml=1472,sh=1086 | |
263726 jaxp java=263509,xml=217 | |
249946 jaxws java=249735,xml=211 | |
103587 corba java=103587 | |
76713 nashorn java=75093,xml=1354,sh=266 |
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
$ lspci | |
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 81) | |
00:01.0 PCI bridge: Intel Corporation 82945G/GZ/P/PL PCI Express Root Port (rev 81) | |
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01) | |
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01) | |
00:1c.2 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 3 (rev 01) | |
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01) | |
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01) | |
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01) | |
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01) |