Skip to content

Instantly share code, notes, and snippets.

@headius
Created February 22, 2014 07:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/9149887 to your computer and use it in GitHub Desktop.
Save headius/9149887 to your computer and use it in GitHub Desktop.
Sampled profile of the BigMath.PI method in JRuby.
Flat profile of 137.72 secs (9757 total ticks): main
Interpreted + native Method
0.5% 47 + 0 java.math.BigDecimal.createAndStripZerosToMatchScale
0.1% 9 + 0 org.jruby.ast.WhileNode.interpret
0.0% 2 + 0 org.jruby.parser.RubyParser.<clinit>
0.0% 2 + 0 org.jruby.runtime.Helpers.restructureBlockArgs19
0.0% 2 + 0 jnr.x86asm.INST_CODE.<clinit>
0.0% 1 + 1 java.lang.invoke.MethodHandleNatives.resolve
0.0% 2 + 0 org.jruby.RubyString.cat19
0.0% 0 + 2 java.lang.Class.forName0
0.0% 2 + 0 java.math.BigInteger.divideAndRemainderKnuth
0.0% 2 + 0 java.nio.HeapCharBuffer.<init>
0.0% 1 + 0 java.math.MutableBigInteger.<init>
0.0% 1 + 0 org.jruby.ast.NewlineNode.<init>
0.0% 1 + 0 java.lang.invoke.InvokerBytecodeGenerator.isSelectAlternative
0.0% 1 + 0 com.kenai.jffi.Platform.isSupported
0.0% 1 + 0 org.jruby.Ruby.initCore
0.0% 1 + 0 java.lang.reflect.Executable.sharedGetParameterAnnotations
0.0% 1 + 0 java.lang.System.checkKey
0.0% 1 + 0 java.lang.invoke.LambdaForm$LFI.interpret_L
0.0% 1 + 0 java.lang.invoke.LambdaForm.signatureType
0.0% 1 + 0 java.lang.UNIXProcess.<clinit>
0.0% 1 + 0 org.jruby.RubyArray.<init>
0.0% 1 + 0 jnr.posix.NativeTimes$Layout.<init>
0.0% 1 + 0 org.jruby.ast.ArrayNode.interpretPrimitive
0.0% 1 + 0 org.jruby.RubyModule.defineConstant
0.0% 1 + 0 org.jruby.gen.org$jruby$RubyThread$POPULATOR.populate
1.6% 148 + 9 Total interpreted (including elided)
Compiled + native Method
45.3% 4415 + 9 java.math.BigInteger.multiply
23.5% 2248 + 45 java.math.MutableBigInteger.divideOneWord
15.4% 1498 + 2 java.math.BigInteger.square
11.5% 1121 + 3 java.math.BigInteger.multiplyToomCook3
0.3% 0 + 31 java.math.BigInteger.shiftLeft
0.3% 2 + 26 java.math.BigInteger.add
0.2% 21 + 0 java.math.BigInteger.shiftRight
0.2% 18 + 0 java.math.BigInteger.pow
0.2% 0 + 17 java.math.BigInteger.subtract
0.1% 7 + 0 org.jruby.RubyModule.constantEntryFetch
0.1% 5 + 1 java.math.MutableBigInteger.normalize
0.1% 0 + 5 java.math.BigInteger.divideAndRemainder
0.1% 0 + 5 java.math.BigInteger.shiftRightImpl
0.0% 4 + 0 org.jruby.ext.bigdecimal.RubyBigDecimal.op_div
0.0% 4 + 0 java.math.BigInteger.multiplyKaratsuba
0.0% 3 + 0 java.math.BigInteger.multiply
0.0% 2 + 0 org.jruby.ext.bigdecimal.RubyBigDecimal.multInternal
0.0% 2 + 0 org.jruby.ext.bigdecimal.RubyBigDecimal.setResult
0.0% 2 + 0 org.jruby.runtime.callsite.MinusCallSite.call
0.0% 2 + 0 java.math.BigDecimal.createAndStripZerosToMatchScale
0.0% 0 + 2 java.math.BigInteger.squareToLen
0.0% 2 + 0 org.jruby.ext.bigdecimal.RubyBigDecimal$INVOKER$i$1$0$op_plus19.call
0.0% 2 + 0 org.jruby.ext.bigdecimal.RubyBigDecimal$INVOKER$i$1$0$op_mul19.call
0.0% 0 + 2 java.math.BigInteger.multiplyToLen
0.0% 1 + 0 org.jruby.ast.LocalAsgnNode.interpret
97.7% 9372 + 164 Total compiled (including elided)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment