Skip to content

Instantly share code, notes, and snippets.

@headius
Created March 10, 2012 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/2012560 to your computer and use it in GitHub Desktop.
Save headius/2012560 to your computer and use it in GitHub Desktop.
system ~/projects/jruby $ jruby -J-XX:+PrintCompilation -X+C bench/bench_fib_recursive.rb 10 35
85 1 java.lang.String::hashCode (64 bytes)
129 2 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)
137 3 java.math.BigInteger::mulAdd (81 bytes)
140 4 java.math.BigInteger::multiplyToLen (219 bytes)
144 5 java.math.BigInteger::addOne (77 bytes)
146 6 java.math.BigInteger::squareToLen (172 bytes)
148 7 java.math.BigInteger::primitiveLeftShift (79 bytes)
150 8 java.math.BigInteger::montReduce (99 bytes)
160 9 java.lang.String::charAt (33 bytes)
161 10 sun.security.provider.SHA::implCompress (491 bytes)
170 11 java.util.jar.Manifest$FastInputStream::readLine (167 bytes)
174 12 java.lang.Object::<init> (1 bytes)
174 13 sun.security.util.ManifestDigester::findSection (180 bytes)
175 14 java.lang.String::equals (88 bytes)
--- n sun.misc.Unsafe::getInt
176 15 java.lang.CharacterDataLatin1::getProperties (11 bytes)
177 16 java.lang.String::indexOf (151 bytes)
178 17 java.lang.Integer::reverseBytes (26 bytes)
263 2 made not entrant sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)
275 18 sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (490 bytes)
343 19 java.util.Arrays::fill (28 bytes)
347 19 made not entrant java.util.Arrays::fill (28 bytes)
387 20 java.util.Arrays::fill (28 bytes)
390 20 made not entrant java.util.Arrays::fill (28 bytes)
429 18 made not entrant sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (490 bytes)
436 1% sun.nio.cs.UTF_8$Encoder::encodeArrayLoop @ 73 (490 bytes)
438 2% java.util.Arrays::fill @ 10 (28 bytes)
443 21 java.lang.String::lastIndexOf (156 bytes)
445 22 sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (490 bytes)
447 3% sun.nio.cs.UTF_8$Decoder::decodeArrayLoop @ 73 (553 bytes)
452 23 java.util.HashMap::indexFor (6 bytes)
452 24 java.util.LinkedList::indexOf (87 bytes)
494 25 org.joni.OptMapInfo::clear (44 bytes)
--- n java.lang.System::arraycopy (static)
512 26 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)
515 27 java.io.UnixFileSystem::normalize (75 bytes)
545 28 org.jruby.lexer.yacc.ByteArrayLexerSource$ByteArrayCursor::read (49 bytes)
545 29 org.jruby.lexer.yacc.ByteArrayLexerSource::access$000 (6 bytes)
547 30 org.jruby.lexer.yacc.ByteArrayLexerSource::forward (108 bytes)
549 31 java.lang.String::replace (142 bytes)
553 32 java.util.Arrays::fill (28 bytes)
558 33 org.objectweb.asm.Type::getArgumentsAndReturnSizes (151 bytes)
559 34 java.lang.Math::min (11 bytes)
562 35 org.objectweb.asm.ByteVector::putUTF8 (394 bytes)
571 36 java.lang.String::getChars (66 bytes)
572 37 java.lang.AbstractStringBuilder::append (60 bytes)
573 38 java.lang.StringBuilder::append (8 bytes)
576 39 org.objectweb.asm.Type::getArgumentTypes (131 bytes)
577 40 org.objectweb.asm.Type::a (267 bytes)
582 41 java.lang.AbstractStringBuilder::append (40 bytes)
599 42 java.util.Arrays::copyOfRange (63 bytes)
599 43 java.lang.String::<init> (72 bytes)
608 44 java.util.regex.Matcher::search (109 bytes)
617 45 java.lang.String::indexOf (166 bytes)
621 46 java.lang.String::lastIndexOf (151 bytes)
623 47 java.lang.AbstractStringBuilder::<init> (12 bytes)
626 48 org.objectweb.asm.ClassWriter::a (49 bytes)
638 49 java.lang.StringBuilder::toString (17 bytes)
644 50 org.objectweb.asm.Item::a (138 bytes)
655 51 java.util.regex.Pattern$BmpCharProperty::match (50 bytes)
657 52 java.util.regex.Pattern$Single::isSatisfiedBy (14 bytes)
664 53 java.lang.StringBuilder::append (8 bytes)
667 54 org.jruby.lexer.yacc.ByteArrayLexerSource::read (10 bytes)
668 51 made not entrant java.util.regex.Pattern$BmpCharProperty::match (50 bytes)
678 55 java.lang.StringBuilder::<init> (7 bytes)
687 56 java.util.HashMap::hash (23 bytes)
688 57 org.objectweb.asm.ClassWriter::b (152 bytes)
694 58 org.objectweb.asm.Item::a (354 bytes)
711 59 java.util.regex.Matcher::reset (83 bytes)
712 60 org.objectweb.asm.ByteVector::putShort (52 bytes)
714 61 org.objectweb.asm.Frame::a (576 bytes)
716 62 org.objectweb.asm.Frame::a (2252 bytes)
741 2 made zombie sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)
742 63 org.objectweb.asm.Frame::a (224 bytes)
--- n java.lang.Class::isArray
744 20 made zombie java.util.Arrays::fill (28 bytes)
744 19 made zombie java.util.Arrays::fill (28 bytes)
744 64 org.objectweb.asm.ByteVector::putByte (39 bytes)
744 65 sun.net.www.ParseUtil::encodePath (336 bytes)
--- n java.lang.Class::isPrimitive
764 66 org.jruby.parser.Ruby19Parser::yyparse (932 bytes)
793 67 java.lang.String::<init> (20 bytes)
793 68 java.lang.Class::getName (20 bytes)
794 69 org.jruby.util.CodegenUtils::ci (307 bytes)
801 70 org.objectweb.asm.Frame::b (110 bytes)
804 71 org.jruby.util.CodegenUtils::p (12 bytes)
805 72 java.util.regex.Pattern$BmpCharProperty::match (50 bytes)
808 73 java.lang.CharacterDataLatin1::getType (10 bytes)
809 74 java.lang.String::indexOf (7 bytes)
809 75 org.objectweb.asm.MethodWriter::b (261 bytes)
819 76 java.lang.String::substring (83 bytes)
820 77 org.objectweb.asm.Item::<init> (66 bytes)
820 78 java.lang.Character::isLetterOrDigit (158 bytes)
821 79 java.lang.CharacterDataLatin1::isLetterOrDigit (21 bytes)
822 80 org.jruby.lexer.yacc.RubyYaccLexer::isIdentifierChar (27 bytes)
823 81 org.jcodings.SingleByteEncoding::codeToMbcLength (2 bytes)
823 82 org.jruby.lexer.yacc.RubyYaccLexer::isMultiByteChar (18 bytes)
824 83 org.objectweb.asm.ByteVector::b (64 bytes)
825 84 org.objectweb.asm.ClassWriter::newUTF8 (70 bytes)
833 85 java.nio.Buffer::position (43 bytes)
833 86 org.jruby.lexer.yacc.RubyYaccLexer::yylex (1541 bytes)
964 18 made zombie sun.nio.cs.UTF_8$Encoder::encodeArrayLoop (490 bytes)
965 87 org.jruby.lexer.yacc.RubyYaccLexer::getIdentifier (117 bytes)
--- n java.lang.Thread::currentThread (static)
987 88 org.jruby.lexer.yacc.ByteArrayLexerSource::skipUntil (22 bytes)
991 51 made zombie java.util.regex.Pattern$BmpCharProperty::match (50 bytes)
991 89 org.jruby.lexer.yacc.LexerSource::getVirtualLine (10 bytes)
992 90 org.jruby.lexer.yacc.SimplePositionFactory::getPosition (19 bytes)
993 91 org.jruby.lexer.yacc.LexerSource::getPosition (9 bytes)
995 92 org.jruby.lexer.yacc.SimplePositionFactory::getPosition (54 bytes)
996 93 org.jruby.lexer.yacc.RubyYaccLexer::getPosition (8 bytes)
998 94 java.util.ArrayList::get (12 bytes)
998 95 java.util.ArrayList::RangeCheck (48 bytes)
998 96 org.jruby.lexer.yacc.ByteArrayLexerSource::unread (29 bytes)
1001 97 org.jruby.lexer.yacc.ByteArrayLexerSource$ByteArrayCursor::unread (72 bytes)
1001 98 org.jruby.lexer.yacc.ByteArrayLexerSource::access$100 (6 bytes)
1002 99 org.jruby.lexer.yacc.ByteArrayLexerSource::backward (48 bytes)
1003 100 org.jruby.util.CodegenUtils::sigParams (47 bytes)
1003 101 java.nio.charset.CoderResult::isUnderflow (13 bytes)
1003 102 org.objectweb.asm.MethodWriter::visitVarInsn (281 bytes)
1008 103 org.jruby.compiler.impl.SkinnyMethodAdapter::aload (11 bytes)
1009 104 org.objectweb.asm.ClassWriter::c (39 bytes)
1014 105 org.objectweb.asm.Frame::b (416 bytes)
1022 106 org.objectweb.asm.MethodWriter::visitMaxs (1155 bytes)
1022 107 java.lang.String::startsWith (78 bytes)
1024 108 ! java.net.URL::<init> (531 bytes)
1051 109 java.util.HashMap::get (79 bytes)
1055 110 s java.lang.StringBuffer::append (8 bytes)
1059 111 java.lang.AbstractStringBuilder::expandCapacity (40 bytes)
1061 112 org.objectweb.asm.Frame::c (45 bytes)
1061 113 org.jruby.RubyBasicObject::getRuntime (8 bytes)
1062 114 org.objectweb.asm.Label::<init> (5 bytes)
1062 115 java.util.ArrayList::ensureCapacity (58 bytes)
1064 116 java.util.ArrayList::add (29 bytes)
1066 117 java.util.WeakHashMap$HashIterator::hasNext (95 bytes)
1069 118 org.objectweb.asm.Label::a (214 bytes)
1076 44 made not entrant java.util.regex.Matcher::search (109 bytes)
1081 4% java.util.regex.Matcher::search @ 46 (109 bytes)
1086 119 java.util.regex.Matcher::search (109 bytes)
1094 120 org.jcodings.Encoding::isAscii (10 bytes)
1094 121 org.jruby.lexer.yacc.RubyYaccLexer::setState (6 bytes)
1099 122 org.jruby.compiler.ASTInspector::inspect (3037 bytes)
1110 123 org.objectweb.asm.MethodWriter::visitMethodInsn (221 bytes)
1151 124 org.objectweb.asm.ClassWriter::a (91 bytes)
1165 125 java.nio.Buffer::hasRemaining (17 bytes)
1166 126 java.util.regex.Pattern::has (15 bytes)
1167 127 java.lang.String::toUpperCase (442 bytes)
1172 128 org.jruby.ast.Node::<init> (28 bytes)
1172 129 org.jruby.parser.StaticScope::findVariableName (31 bytes)
1174 130 org.jcodings.specific.ASCIIEncoding::isCodeCType (18 bytes)
1179 131 org.jruby.util.StringSupport::searchNonAscii (24 bytes)
1181 132 org.joni.BitSet::bit (8 bytes)
1181 133 org.joni.ast.CClassNode::isNot (15 bytes)
1183 134 org.jruby.util.CodegenUtils::sig (25 bytes)
1202 123 made not entrant org.objectweb.asm.MethodWriter::visitMethodInsn (221 bytes)
1203 135 org.objectweb.asm.MethodWriter::visitLabel (281 bytes)
1203 136 ! java.util.AbstractList$Itr::next (46 bytes)
1204 137 java.util.AbstractList$Itr::checkForComodification (23 bytes)
1206 138 s java.lang.StringBuffer::append (8 bytes)
1225 139 org.jruby.compiler.impl.SkinnyMethodAdapter::invokevirtual (14 bytes)
1225 122 made not entrant org.jruby.compiler.ASTInspector::inspect (3037 bytes)
1228 44 made zombie java.util.regex.Matcher::search (109 bytes)
1231 140 java.util.AbstractList$Itr::hasNext (20 bytes)
1232 141 org.jruby.compiler.ASTInspector::inspect (3037 bytes)
1239 142 s java.lang.StringBuffer::toString (17 bytes)
1244 143 org.jruby.compiler.ASTCompiler19::compile (90 bytes)
1245 144 org.jruby.compiler.ASTCompiler::compile (1409 bytes)
1272 145 org.jruby.ast.ListNode::size (10 bytes)
1272 146 java.util.regex.Matcher::find (69 bytes)
1273 144 made not entrant org.jruby.compiler.ASTCompiler::compile (1409 bytes)
1278 147 java.lang.String::subSequence (7 bytes)
1280 148 java.util.SubList$1::hasNext (20 bytes)
1280 149 java.util.SubList$1::nextIndex (18 bytes)
1281 150 org.joni.BitSet::at (24 bytes)
1282 151 org.joni.Analyser::optimizeNodeLeft (1795 bytes)
1312 152 java.lang.StringBuffer::<init> (7 bytes)
1313 153 org.objectweb.asm.MethodWriter::c (551 bytes)
1328 154 org.objectweb.asm.Frame::<init> (5 bytes)
1328 123 made zombie org.objectweb.asm.MethodWriter::visitMethodInsn (221 bytes)
1345 155 ! org.joni.ast.CClassNode::addCType (534 bytes)
--- n java.lang.String::intern
1353 156 org.joni.Regex::setupBMSkipMap (172 bytes)
1353 157 org.jruby.util.ByteList::invalidate (11 bytes)
1356 158 org.jruby.compiler.impl.BaseBodyCompiler::loadThreadContext (9 bytes)
1357 159 org.objectweb.asm.ClassWriter::a (70 bytes)
1385 160 java.lang.String::compareTo (150 bytes)
1390 161 java.nio.Buffer::limit (62 bytes)
1391 162 java.util.zip.ZStreamRef::address (5 bytes)
1392 163 java.util.zip.InflaterInputStream::ensureOpen (18 bytes)
1400 164 java.nio.Buffer::<init> (68 bytes)
1401 165 java.util.AbstractCollection::<init> (5 bytes)
1403 166 java.util.regex.Matcher::appendReplacement (276 bytes)
1411 167 org.objectweb.asm.ClassWriter::newClass (9 bytes)
1421 168 org.objectweb.asm.ClassWriter::a (15 bytes)
1436 169 org.objectweb.asm.ByteVector::putInt (74 bytes)
1448 170 org.objectweb.asm.Type::a (87 bytes)
1450 171 java.lang.AbstractStringBuilder::append (46 bytes)
1454 172 s java.lang.StringBuffer::append (10 bytes)
1458 173 java.util.concurrent.ConcurrentHashMap::hash (49 bytes)
1458 174 java.util.concurrent.ConcurrentHashMap::segmentFor (17 bytes)
--- n sun.misc.Unsafe::compareAndSwapInt
1473 175 java.util.concurrent.locks.AbstractOwnableSynchronizer::setExclusiveOwnerThread (6 bytes)
1487 176 java.util.regex.Pattern::peek (26 bytes)
1487 177 s! sun.misc.URLClassPath::getLoader (145 bytes)
1494 178 org.joni.OptMapInfo::altMerge (121 bytes)
1506 179 java.nio.Buffer::nextPutIndex (31 bytes)
1506 122 made zombie org.jruby.compiler.ASTInspector::inspect (3037 bytes)
1506 144 made zombie org.jruby.compiler.ASTCompiler::compile (1409 bytes)
1507 28 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource$ByteArrayCursor::read (49 bytes)
1507 30 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource::forward (108 bytes)
1507 29 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource::access$000 (6 bytes)
1507 54 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource::read (10 bytes)
1507 89 made not entrant org.jruby.lexer.yacc.LexerSource::getVirtualLine (10 bytes)
1507 88 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource::skipUntil (22 bytes)
1508 90 made not entrant org.jruby.lexer.yacc.SimplePositionFactory::getPosition (19 bytes)
1508 96 made not entrant org.jruby.lexer.yacc.ByteArrayLexerSource::unread (29 bytes)
1508 87 made not entrant org.jruby.lexer.yacc.RubyYaccLexer::getIdentifier (117 bytes)
1508 93 made not entrant org.jruby.lexer.yacc.RubyYaccLexer::getPosition (8 bytes)
1508 92 made not entrant org.jruby.lexer.yacc.SimplePositionFactory::getPosition (54 bytes)
1508 91 made not entrant org.jruby.lexer.yacc.LexerSource::getPosition (9 bytes)
1508 86 made not entrant org.jruby.lexer.yacc.RubyYaccLexer::yylex (1541 bytes)
1508 180 org.jruby.lexer.yacc.RubyYaccLexer::yylex (1541 bytes)
1508 181 org.jruby.lexer.yacc.RubyYaccLexer::getIdentifier (117 bytes)
1535 182 org.objectweb.asm.MethodWriter::visitInsn (95 bytes)
1539 69 made not entrant org.jruby.util.CodegenUtils::ci (307 bytes)
1539 183 org.jruby.lexer.yacc.ByteArrayLexerSource::skipUntil (22 bytes)
1544 184 org.jruby.lexer.yacc.ByteArrayLexerSource$ByteArrayCursor::read (49 bytes)
1547 185 org.jruby.lexer.yacc.ByteArrayLexerSource::access$000 (6 bytes)
1548 186 org.jruby.lexer.yacc.ByteArrayLexerSource::forward (108 bytes)
1549 187 org.jruby.lexer.yacc.LexerSource::getPosition (9 bytes)
1550 188 org.jruby.lexer.yacc.SimplePositionFactory::getPosition (54 bytes)
1552 189 org.jruby.lexer.yacc.RubyYaccLexer::getPosition (8 bytes)
1553 190 org.jruby.lexer.yacc.ByteArrayLexerSource::read (10 bytes)
1555 191 org.jruby.util.ByteList::grow (70 bytes)
1557 192 org.jruby.util.ByteList::append (36 bytes)
1559 193 org.jruby.util.ByteList::append (9 bytes)
1562 194 org.jruby.lexer.yacc.LexerSource::getVirtualLine (10 bytes)
1562 195 org.jruby.util.CodegenUtils::sigParams (53 bytes)
1688 196 java.util.HashMap::getEntry (79 bytes)
1691 197 java.util.HashMap::put (126 bytes)
1696 198 sun.misc.URLClassPath::getResource (74 bytes)
1719 199 org.jruby.runtime.callsite.CacheEntry::typeOk (17 bytes)
1719 200 org.jruby.runtime.ThreadContext::callThreadPoll (23 bytes)
1719 201 org.jruby.runtime.callsite.CachingCallSite::pollAndGetClass (13 bytes)
1720 202 org.jruby.RubyFixnum::newFixnum (29 bytes)
1722 203 org.jruby.RubyFixnum::isInCacheRange (22 bytes)
1722 204 org.jruby.runtime.callsite.CachingCallSite::call (54 bytes)
1723 205 org.jruby.runtime.callsite.CachingCallSite::call (17 bytes)
1727 206 org.jruby.RubyBasicObject::isTrue (15 bytes)
1727 207 org.jruby.ast.executable.AbstractScript::getCallSite1 (10 bytes)
1728 208 org.jruby.RubyBoolean::newBoolean (16 bytes)
1728 209 bench$bench_fib_recursive$method__0$RUBY$fib_ruby::call (15 bytes)
1739 210 bench$bench_fib_recursive$method__0$RUBY$fib_ruby::call (23 bytes)
1743 211 bench.bench_fib_recursive::method__0$RUBY$fib_ruby (88 bytes)
1752 212 org.jruby.RubyFixnum$INVOKER$i$1$0$op_lt19::call (11 bytes)
1753 213 org.jruby.RubyFixnum::op_lt19 (42 bytes)
1754 214 org.jruby.RubyFixnum$INVOKER$i$1$0$op_minus::call (11 bytes)
1755 215 org.jruby.RubyFixnum::op_minus (24 bytes)
1757 216 org.jruby.RubyFixnum::subtractFixnum (43 bytes)
1758 217 org.jruby.RubyFixnum::subtractionOverflowed (31 bytes)
1758 218 org.jruby.ast.executable.AbstractScript::getCallSite4 (10 bytes)
1759 219 org.jruby.ast.executable.AbstractScript::getCallSite5 (10 bytes)
1759 220 org.jruby.ast.executable.AbstractScript::getCallSite6 (11 bytes)
1759 221 org.jruby.ast.executable.AbstractScript::getCallSite2 (10 bytes)
1760 222 org.jruby.ast.executable.AbstractScript::getCallSite3 (10 bytes)
1760 223 org.jruby.RubyFixnum$INVOKER$i$1$0$op_plus::call (11 bytes)
1760 224 org.jruby.RubyFixnum::op_plus (24 bytes)
1763 225 org.jruby.RubyFixnum::addFixnum (43 bytes)
1763 226 org.jruby.RubyFixnum::additionOverflowed (27 bytes)
2148 227 org.jruby.runtime.ThreadContext::pollThreadEvents (9 bytes)
2148 228 org.jruby.RubyThread::pollThreadEvents (13 bytes)
2746 201 made not entrant org.jruby.runtime.callsite.CachingCallSite::pollAndGetClass (13 bytes)
2746 204 made not entrant org.jruby.runtime.callsite.CachingCallSite::call (54 bytes)
1.181000 0.000000 1.181000 ( 1.181000)
0.966000 0.000000 0.966000 ( 0.966000)
0.972000 0.000000 0.972000 ( 0.972000)
0.968000 0.000000 0.968000 ( 0.968000)
0.966000 0.000000 0.966000 ( 0.966000)
0.977000 0.000000 0.977000 ( 0.977000)
0.996000 0.000000 0.996000 ( 0.996000)
0.995000 0.000000 0.995000 ( 0.995000)
1.000000 0.000000 1.000000 ( 1.000000)
0.987000 0.000000 0.987000 ( 0.987000)
11596 38 made not entrant java.lang.StringBuilder::append (8 bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment