Skip to content

Instantly share code, notes, and snippets.

View brixen's full-sized avatar

Brian Shirai brixen

View GitHub Profile
gauss:rubinius brian$ vm/external_libs/llvm/Release/bin/llvm-config --cflags
-I/Users/brian/devel/rubinius/vm/external_libs/llvm/include -I/Users/brian/devel/rubinius/vm/external_libs/llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-common
gauss:rubinius brian$ ruby1.9 -e 'p RUBY_VERSION; RUBY_VERSION = "1.8.6"; p RUBY_VERSION'
"1.9.2"
-e:1: warning: already initialized constant RUBY_VERSION
"1.8.6"
gauss:rubinius brian$ irb
>> module M
>> private
>> def foo
>> puts 'foo'
>> end
>> end
=> nil
>> class F
>> include M
while true
begin
break
rescue
end
end
gauss:rubinius brian$ bin/rbx -r compiler-ng -P self_seconds -e 'Rubinius::CompilerNG.compile_file "lib/ruby_parser.rb"'
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
13.90 1.68 0.12 26090 0.00 0.06 Array#each
0.54 0.26 0.08 678 0.12 0.38 Compiler::StackDepthCalculator#run_from
0.17 0.08 0.07 181026 0.00 0.00 Kernel#===
0.47 0.24 0.06 1 58.91 239.81 Rubinius::Melbourne#file_to_ast
0.12 0.06 0.06 38726 0.00 0.00 Proc.__from_block__
0.10 0.05 0.05 23 2.22 2.22 Rubinius::CompiledMethod.scripts
@brixen
brixen / after
Created September 18, 2009 06:50
gauss:rubinius brian$ bin/rbx -r compiler-ng -P self_seconds -e 'Rubinius::CompilerNG.compile_file "lib/ruby_parser.rb"'
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
13.90 1.68 0.12 26090 0.00 0.06 Array#each
0.54 0.26 0.08 678 0.12 0.38 Compiler::StackDepthCalculator#run_from
0.17 0.08 0.07 181026 0.00 0.00 Kernel#===
0.47 0.24 0.06 1 58.91 239.81 Rubinius::Melbourne#file_to_ast
0.12 0.06 0.06 38726 0.00 0.00 Proc.__from_block__
0.10 0.05 0.05 23 2.22 2.22 Rubinius::CompiledMethod.scripts
gauss:rubinius brian$ bin/rbx -Xrbx.gc_stats -r compiler-ng -e 'Rubinius::CompilerNG.compile_file "lib/ruby_parser.rb"'
Garbage collector stats:
Young (6) total max min average
---------------------------------------------------------------------------------
Collections 23
times 291.78m 21.85m 5.35m 12.69m
objects promoted 145,002 45,472 209 6,304.43
objects copied 1,100,898 74,597 9,127 47,865.13
gauss:rubinius brian$ bin/rbx -Xrbx.gc_stats compile-ng kernel/
Garbage collector stats:
Young (6) total max min average
---------------------------------------------------------------------------------
Collections 103
times 1.18s 31.22m 5.16m 11.48m
objects promoted 496,838 45,470 2,634 4,823.67
objects copied 3,696,525 62,606 9,570 35,888.59
gauss:rubinius brian$ bin/rbx -Xprofiler.graph -P self_seconds compile-ng lib/ruby_parser.rb
lib/ruby_parser.rb
index % time self children called name
----------------------------------------------------------
0.03 1.44 18477/55431 Rubinius::AST::Node#visit [18]
0.00 0.06 1011/1025 Rubinius::AST::ActualArguments#bytecode [0]
0.00 0.11 855/5130 Rubinius::SydneyRewriter.sexp_from_array [0]
0.00 1.29 711/711 Enumerable#each_with_index [0]
0.00 0.01 665/665 Enumerable#find_all [0]
0.00 0.09 546/1092 Enumerable#inject [0]
gauss:rubinius brian$ bin/rbx -Xprofiler.graph -P self_seconds compile-ng lib/ruby_parser.rb
lib/ruby_parser.rb
index % time self children called name
----------------------------------------------------------
0.07 0.22 16608/59928 Rubinius::Generator#add [7]
0.00 0.00 1167/9555 Hash.[] [0]
0.00 0.00 866/3179 Array#pop [0]
0.00 0.00 356/712 Rubinius::Generator#close [0]
0.00 0.00 346/1038 Rubinius::AST::Define#initialize [0]
0.00 0.00 336/2352 Array::IdentityMap#include? [0]