Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created June 4, 2015 18:35
Show Gist options
  • Save djberg96/a21369e83b0ee7f7b614 to your computer and use it in GitHub Desktop.
Save djberg96/a21369e83b0ee7f7b614 to your computer and use it in GitHub Desktop.
fast_gettext profile
dberger:/Users/dberger/Programming/Ruby/JRuby >ruby -rprofile potest.rb
% cumulative self self total
time seconds seconds calls ms/call ms/call name
36.40 1.03 1.03 1 1030.00 2490.00 FastGettext::GetText::PoParser#parse
9.54 1.30 0.27 10000 0.03 0.03 FastGettext::GetText::PoParser#unescape
8.48 1.54 0.24 155000 0.00 0.00 Regexp#===
6.71 1.73 0.19 1 190.00 1010.00 Racc::Parser#_racc_do_parse_c
4.59 1.86 0.13 5000 0.03 0.11 FastGettext::GetText::PoParser#_reduce_8
4.24 1.98 0.12 20001 0.01 0.01 FastGettext::GetText::PoParser#next_token
3.89 2.09 0.11 10000 0.01 0.01 FastGettext::GetText::PoParser#_reduce_15
3.53 2.19 0.10 5000 0.02 0.02 FastGettext::GetText::PoParser#on_message
3.18 2.28 0.09 10000 0.01 0.01 FastGettext::GetText::PoParser#unescape_string
2.47 2.35 0.07 40001 0.00 0.00 String#empty?
1.41 2.39 0.04 2970 0.01 0.07 Gem::Specification._resort!
1.06 2.42 0.03 30000 0.00 0.00 String#gsub!
1.06 2.45 0.03 5000 0.01 0.01 nil#
1.06 2.48 0.03 20001 0.00 0.00 Array#push
1.06 2.51 0.03 2969 0.01 0.02 Numeric#nonzero?
1.06 2.54 0.03 20248 0.00 0.00 String#gsub
1.06 2.57 0.03 20002 0.00 0.00 Array#shift
0.71 2.59 0.02 371 0.05 0.62 Gem::Specification.each_stub
0.71 2.61 0.02 236 0.08 0.08 Gem::Version#initialize
0.71 2.63 0.02 2969 0.01 0.01 Fixnum#zero?
0.71 2.65 0.02 1934 0.01 0.04 Gem::StubSpecification#data
0.71 2.67 0.02 5000 0.00 0.00 Fixnum#to_s
0.71 2.69 0.02 20086 0.00 0.00 Array#[]
0.35 2.70 0.01 24 0.42 0.42 Gem::Dependency#initialize
0.35 2.71 0.01 181 0.06 0.06 Gem.default_dir
0.35 2.72 0.01 1 10.00 110.00 Array#sort!
0.35 2.73 0.01 183 0.05 0.16 Array#map
0.35 2.74 0.01 361 0.03 0.08 Gem::StubSpecification::StubLine#version
0.35 2.75 0.01 101 0.10 0.20 Gem::BasicSpecification#base_dir
0.35 2.76 0.01 2 5.00 30.00 Integer#times
0.35 2.77 0.01 470 0.02 0.02 String#split
0.35 2.78 0.01 374 0.03 0.96 Gem::Specification.each_gemspec
0.35 2.79 0.01 84 0.12 0.36 Gem::StubSpecification#full_require_paths
0.35 2.80 0.01 1037 0.01 0.06 Class#new
0.35 2.81 0.01 370 0.03 0.11 Kernel#open
0.35 2.82 0.01 463 0.02 0.09 Gem::BasicSpecification#full_name
0.35 2.83 0.01 5 2.00 2.00 Gem::Specification#description=
0.00 2.83 0.00 371 0.00 0.73 Gem::Specification.stubs
0.00 2.83 0.00 2 0.00 0.00 Singleton.append_features
0.00 2.83 0.00 1 0.00 0.00 Gem.user_dir
0.00 2.83 0.00 2 0.00 0.00 Hash#key?
0.00 2.83 0.00 2 0.00 0.00 Gem.vendor_dir
0.00 2.83 0.00 2 0.00 0.00 File.directory?
0.00 2.83 0.00 1 0.00 0.00 Gem.default_path
0.00 2.83 0.00 1 0.00 0.00 Array#+
0.00 2.83 0.00 1 0.00 0.00 Array#uniq
0.00 2.83 0.00 1 0.00 0.00 Gem::PathSupport#path=
0.00 2.83 0.00 1 0.00 0.00 Gem.default_spec_cache_dir
0.00 2.83 0.00 573 0.00 0.00 String#initialize_copy
0.00 2.83 0.00 663 0.00 0.00 Kernel#initialize_dup
0.00 2.83 0.00 663 0.00 0.00 Kernel#dup
0.00 2.83 0.00 1 0.00 0.00 Gem::PathSupport#initialize
0.00 2.83 0.00 1 0.00 0.00 Gem.paths
0.00 2.83 0.00 1 0.00 0.00 Gem.path
0.00 2.83 0.00 3 0.00 0.00 Gem::Specification.dirs
0.00 2.83 0.00 1 0.00 0.00 Array#collect
0.00 2.83 0.00 3 0.00 0.00 Dir.[]
0.00 2.83 0.00 920 0.00 0.00 String#to_s
0.00 2.83 0.00 382 0.00 0.00 Gem::BasicSpecification#loaded_from=
0.00 2.83 0.00 370 0.00 0.00 Gem::StubSpecification#initialize
0.00 2.83 0.00 370 0.00 0.00 File#initialize
0.00 2.83 0.00 1101 0.00 0.00 IO#readline
0.00 2.83 0.00 731 0.00 0.00 String#chomp
0.00 2.83 0.00 5 0.00 0.00 File.exist?
0.00 2.83 0.00 370 0.00 0.00 IO#closed?
0.00 2.83 0.00 370 0.00 0.00 IO#close
0.00 2.83 0.00 4 0.00 0.00 Gem.user_home
0.00 2.83 0.00 280 0.00 0.00 File.file?
0.00 2.83 0.00 20 0.00 2.00 Gem::Specification.load
0.00 2.83 0.00 98 0.00 0.00 Kernel#instance_variable_defined?
0.00 2.83 0.00 14 0.00 1.43 Gem::StubSpecification#to_spec
0.00 2.83 0.00 370 0.00 0.11 Gem::StubSpecification#valid?
0.00 2.83 0.00 14 0.00 0.00 Gem::Specification#platform
0.00 2.83 0.00 460 0.00 0.00 Gem::StubSpecification#platform
0.00 2.83 0.00 6480 0.00 0.00 Gem::StubSpecification#name
0.00 2.83 0.00 588 0.00 0.05 Gem::StubSpecification#version
0.00 2.83 0.00 538 0.00 0.00 Gem::Version#version
0.00 2.83 0.00 942 0.00 0.00 Kernel#untaint
0.00 2.83 0.00 697 0.00 0.00 Hash#[]=
0.00 2.83 0.00 1 0.00 0.00 Gem.find_home
0.00 2.83 0.00 100 0.00 0.00 File.expand_path
0.00 2.83 0.00 9 0.00 0.00 #<Object:0x007fb9da8cd750>.[]
0.00 2.83 0.00 361 0.00 0.00 String#[]
0.00 2.83 0.00 10 0.00 0.00 Module#private
0.00 2.83 0.00 361 0.00 0.00 Gem::StubSpecification::StubLine#initialize
0.00 2.83 0.00 398 0.00 0.00 Regexp#=~
0.00 2.83 0.00 723 0.00 0.00 String#===
0.00 2.83 0.00 361 0.00 0.00 Gem::Platform.new
0.00 2.83 0.00 361 0.00 0.00 Gem::StubSpecification::StubLine#platform
0.00 2.83 0.00 361 0.00 0.00 Gem::StubSpecification::StubLine#name
0.00 2.83 0.00 448 0.00 0.00 Kernel#class
0.00 2.83 0.00 237 0.00 0.00 String#=~
0.00 2.83 0.00 236 0.00 0.00 Gem::Version.correct?
0.00 2.83 0.00 242 0.00 0.00 String#strip
0.00 2.83 0.00 5 0.00 0.00 Module#attr_reader
0.00 2.83 0.00 250 0.00 0.00 Module#method_added
0.00 2.83 0.00 402 0.00 0.05 Gem::Version.new
0.00 2.83 0.00 19 0.00 0.00 Class#inherited
0.00 2.83 0.00 1 0.00 0.00 BasicObject#==
0.00 2.83 0.00 1 0.00 0.00 Kernel#===
0.00 2.83 0.00 26 0.00 0.00 Array#last
0.00 2.83 0.00 1 0.00 0.00 Kernel#!~
0.00 2.83 0.00 179 0.00 0.06 Gem::BasicSpecification.default_specifications_dir
0.00 2.83 0.00 464 0.00 0.00 File.join
0.00 2.83 0.00 1 0.00 0.00 Gem::Platform#initialize
0.00 2.83 0.00 1 0.00 0.00 Gem::Platform#==
0.00 2.83 0.00 93 0.00 0.00 Kernel#nil?
0.00 2.83 0.00 9 0.00 0.00 Gem::Platform#to_a
0.00 2.83 0.00 9 0.00 0.00 Array#compact
0.00 2.83 0.00 93 0.00 0.00 Array#join
0.00 2.83 0.00 9 0.00 0.00 Gem::Platform#to_s
0.00 2.83 0.00 6 0.00 0.00 IO.read
0.00 2.83 0.00 6 0.00 0.00 Kernel#binding
0.00 2.83 0.00 12 0.00 0.00 Gem::Specification#loaded_from=
0.00 2.83 0.00 192 0.00 0.00 Symbol#to_s
0.00 2.83 0.00 180 0.00 0.00 Kernel#instance_variable_set
0.00 2.83 0.00 186 0.00 0.11 Gem::Specification#initialize
0.00 2.83 0.00 120 0.00 0.00 Gem::Specification#default_value
0.00 2.83 0.00 72 0.00 0.00 Array#initialize_copy
0.00 2.83 0.00 6 0.00 0.00 Hash#initialize_copy
0.00 2.83 0.00 12 0.00 0.00 Kernel#initialize_copy
0.00 2.83 0.00 6 0.00 0.00 Kernel#block_given?
0.00 2.83 0.00 6 0.00 0.00 Gem::Version.create
0.00 2.83 0.00 6 0.00 0.00 Gem::Version#prerelease?
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#invalidate_memoized_attributes
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#version=
0.00 2.83 0.00 61 0.00 0.00 Array#flatten
0.00 2.83 0.00 31 0.00 0.00 Array#compact!
0.00 2.83 0.00 31 0.00 0.00 Array#uniq!
0.00 2.83 0.00 31 0.00 0.00 Gem::Requirement.parse
0.00 2.83 0.00 62 0.00 0.00 Gem::Requirement#initialize
0.00 2.83 0.00 31 0.00 0.00 Array#map!
0.00 2.83 0.00 31 0.00 0.00 Gem::Requirement.create
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#required_rubygems_version=
0.00 2.83 0.00 120 0.00 0.00 Kernel#Array
0.00 2.83 0.00 6 0.00 0.00 Enumerable#grep
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#authors=
0.00 2.83 0.00 314 0.00 0.00 String#to_i
0.00 2.83 0.00 12 0.00 0.00 Fixnum#divmod
0.00 2.83 0.00 8 0.00 0.00 Fixnum#*
0.00 2.83 0.00 18 0.00 0.00 Fixnum#+
0.00 2.83 0.00 93 0.00 0.00 Fixnum#<=>
0.00 2.83 0.00 6 0.00 0.00 Time.utc
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#date=
0.00 2.83 0.00 1 0.00 0.00 String#end_with?
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#executables=
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#extra_rdoc_files=
0.00 2.83 0.00 5 0.00 0.00 Gem::Specification#files=
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#licenses=
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#rdoc_options=
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#require_paths=
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#required_ruby_version=
0.00 2.83 0.00 6 0.00 0.00 Gem::Specification#summary=
0.00 2.83 0.00 98 0.00 0.00 String#scan
0.00 2.83 0.00 448 0.00 0.02 Gem::Version#segments
0.00 2.83 0.00 371 0.00 0.00 String#start_with?
0.00 2.83 0.00 75 0.00 0.13 Gem::Version#<=>
0.00 2.83 0.00 6 0.00 0.00 Comparable#>=
0.00 2.83 0.00 11 0.00 25.45 Kernel#require
0.00 2.83 0.00 4 0.00 0.00 Module#attr_accessor
0.00 2.83 0.00 2 0.00 0.00 Module#attr_writer
0.00 2.83 0.00 24 0.00 0.00 Array#pop
0.00 2.83 0.00 24 0.00 0.00 Array#length
0.00 2.83 0.00 24 0.00 0.00 Fixnum#==
0.00 2.83 0.00 24 0.00 0.00 Array#first
0.00 2.83 0.00 24 0.00 0.00 Array#include?
0.00 2.83 0.00 2 0.00 0.00 Exception#message
0.00 2.83 0.00 26 0.00 0.00 Gem::Specification#dependencies
0.00 2.83 0.00 24 0.00 0.42 Gem::Specification#add_dependency_with_type
0.00 2.83 0.00 23 0.00 0.43 Gem::Specification#add_development_dependency
0.00 2.83 0.00 6 0.00 3.33 Kernel#eval
0.00 2.83 0.00 6 0.00 0.00 Hash#values
0.00 2.83 0.00 2969 0.00 0.00 String#<=>
0.00 2.83 0.00 2 0.00 0.00 Exception#to_s
0.00 2.83 0.00 494 0.00 0.00 Module#===
0.00 2.83 0.00 12 0.00 0.00 Kernel#gem_original_require
0.00 2.83 0.00 1 0.00 0.00 Exception#backtrace
0.00 2.83 0.00 84 0.00 0.00 Gem::StubSpecification#activated?
0.00 2.83 0.00 357 0.00 0.00 File.dirname
0.00 2.83 0.00 178 0.00 0.06 Gem::BasicSpecification#default_gem?
0.00 2.83 0.00 83 0.00 0.00 Gem::StubSpecification#extensions
0.00 2.83 0.00 84 0.00 0.12 Gem::StubSpecification#missing_extensions?
0.00 2.83 0.00 1 0.00 0.00 Exception#exception
0.00 2.83 0.00 83 0.00 0.00 Gem::StubSpecification::StubLine#require_paths
0.00 2.83 0.00 86 0.00 0.00 Gem::BasicSpecification#raw_require_paths
0.00 2.83 0.00 1 0.00 0.00 TracePoint#enable
0.00 2.83 0.00 85 0.00 0.24 Gem::BasicSpecification#gems_dir
0.00 2.83 0.00 84 0.00 0.24 Gem::StubSpecification#find_full_gem_path
0.00 2.83 0.00 86 0.00 0.23 Gem::BasicSpecification#full_gem_path
0.00 2.83 0.00 171 0.00 0.23 Gem::BasicSpecification#full_require_paths
0.00 2.83 0.00 1 0.00 0.00 Exception#initialize
0.00 2.83 0.00 439 0.00 0.09 Gem::BasicSpecification#contains_requirable_file?
0.00 2.83 0.00 173 0.00 0.00 Enumerable#any?
0.00 2.83 0.00 99 0.00 0.00 Symbol#==
0.00 2.83 0.00 1 0.00 0.00 TracePoint#disable
0.00 2.83 0.00 6 0.00 6.67 Enumerable#find
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#extensions=
0.00 2.83 0.00 5 0.00 0.00 Gem::Specification#installed_by_version=
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#extensions
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#installed_by_version
0.00 2.83 0.00 4 0.00 0.00 Comparable#<
0.00 2.83 0.00 8 0.00 0.00 Gem.default_ext_dir_for
0.00 2.83 0.00 8 0.00 0.00 Gem::Platform.local
0.00 2.83 0.00 8 0.00 0.00 Gem.ruby_api_version
0.00 2.83 0.00 8 0.00 0.00 Gem.extension_api_version
0.00 2.83 0.00 8 0.00 0.00 Gem::BasicSpecification#extensions_dir
0.00 2.83 0.00 5 0.00 0.00 Gem::Specification#full_name
0.00 2.83 0.00 9 0.00 0.00 Gem::BasicSpecification#extension_dir
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#gem_build_complete_path
0.00 2.83 0.00 4 0.00 0.00 Gem::Specification#missing_extensions?
0.00 2.83 0.00 1 0.00 0.00 Array#concat
0.00 2.83 0.00 1 0.00 0.00 Gem::BasicSpecification#require_paths
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#add_runtime_dependency
0.00 2.83 0.00 14 0.00 0.00 Gem::Dependency#type
0.00 2.83 0.00 16 0.00 0.00 Gem::Specification#runtime_dependencies
0.00 2.83 0.00 2 0.00 0.00 Array#select
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#conflicts
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#raise_if_conflicts
0.00 2.83 0.00 1 0.00 0.00 Hash#delete
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#activate_dependencies
0.00 2.83 0.00 1 0.00 0.00 Gem::BasicSpecification#find_full_gem_path
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#find_full_gem_path
0.00 2.83 0.00 3 0.00 0.00 String#==
0.00 2.83 0.00 1 0.00 0.00 Array#index
0.00 2.83 0.00 1 0.00 0.00 Gem.load_path_insert_index
0.00 2.83 0.00 1 0.00 0.00 Array#insert
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#add_self_to_load_path
0.00 2.83 0.00 1 0.00 0.00 Gem::Specification#activate
0.00 2.83 0.00 1 0.00 280.00 Gem.try_activate
0.00 2.83 0.00 26 0.00 0.00 BasicObject#singleton_method_added
0.00 2.83 0.00 1 0.00 0.00 Struct.new
0.00 2.83 0.00 2 0.00 0.00 String#force_encoding
0.00 2.83 0.00 1 0.00 0.00 BasicObject#singleton_method_undefined
0.00 2.83 0.00 1 0.00 0.00 Module#undef_method
0.00 2.83 0.00 5 0.00 0.00 Module#append_features
0.00 2.83 0.00 5 0.00 0.00 Module#included
0.00 2.83 0.00 5 0.00 0.00 Module#include
0.00 2.83 0.00 2 0.00 0.00 BasicObject#initialize
0.00 2.83 0.00 3 0.00 0.00 Module#extend_object
0.00 2.83 0.00 3 0.00 0.00 Module#extended
0.00 2.83 0.00 3 0.00 0.00 Kernel#extend
0.00 2.83 0.00 4 0.00 0.00 Regexp.quote
0.00 2.83 0.00 13 0.00 0.00 Module#module_eval
0.00 2.83 0.00 4 0.00 0.00 Forwardable#def_instance_delegator
0.00 2.83 0.00 4 0.00 0.00 Prime.method_added
0.00 2.83 0.00 2 0.00 0.00 Kernel#instance_of?
0.00 2.83 0.00 1 0.00 0.00 Gem.ruby_engine
0.00 2.83 0.00 2 0.00 0.00 Module#private_class_method
0.00 2.83 0.00 2 0.00 0.00 Mutex#initialize
0.00 2.83 0.00 4 0.00 0.00 Singleton.__init__
0.00 2.83 0.00 20 0.00 0.00 IO#set_encoding
0.00 2.83 0.00 2 0.00 0.00 Singleton.included
0.00 2.83 0.00 1 0.00 0.00 Fixnum#<<
0.00 2.83 0.00 1 0.00 0.00 Fixnum#-
0.00 2.83 0.00 1 0.00 0.00 FastGettext::GetText::PoParser#initialize
0.00 2.83 0.00 1 0.00 0.00 Hash#initialize
0.00 2.83 0.00 1 0.00 0.00 FastGettext::GetText::MOFile#initialize
0.00 2.83 0.00 12 0.00 0.00 MonitorMixin#mon_exit
0.00 2.83 0.00 11 0.00 0.00 Mutex#unlock
0.00 2.83 0.00 12 0.00 0.00 MonitorMixin#mon_check_owner
0.00 2.83 0.00 1 0.00 60.00 Enumerator#each
0.00 2.83 0.00 1 0.00 60.00 Enumerable#map
0.00 2.83 0.00 1 0.00 0.00 String#strip!
0.00 2.83 0.00 12 0.00 0.00 Gem::Specification.unresolved_deps
0.00 2.83 0.00 214 0.00 1.31 Array#each
0.00 2.83 0.00 2 0.00 0.00 Array#size
0.00 2.83 0.00 1 0.00 0.00 Fixnum#<
0.00 2.83 0.00 1 0.00 0.00 Racc::Parser#_racc_setup
0.00 2.83 0.00 44 0.00 0.00 Gem.find_unresolved_default_spec
0.00 2.83 0.00 95 0.00 0.00 Gem.suffixes
0.00 2.83 0.00 55 0.00 0.00 Kernel#respond_to?
0.00 2.83 0.00 405 0.00 0.00 Kernel#respond_to_missing?
0.00 2.83 0.00 5000 0.00 0.00 String#+
0.00 2.83 0.00 5000 0.00 0.00 String#size
0.00 2.83 0.00 5001 0.00 0.00 Fixnum#>
0.00 2.83 0.00 5000 0.00 0.00 Array#clear
0.00 2.83 0.00 12 0.00 0.00 MonitorMixin#mon_enter
0.00 2.83 0.00 11 0.00 0.00 Mutex#lock
0.00 2.83 0.00 35 0.00 0.00 Thread.current
0.00 2.83 0.00 1 0.00 1010.00 Racc::Parser#do_parse
0.00 2.83 0.00 2 0.00 0.00 BasicObject#instance_eval
-0.00 2.83 -0.00 85 -0.00 3.76 Gem::Specification.find_inactive_by_path
0.00 2.83 0.00 1 0.00 2830.00 #toplevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment