Skip to content

Instantly share code, notes, and snippets.

@jasiek
Created March 11, 2012 23:58
Show Gist options
  • Select an option

  • Save jasiek/2018757 to your computer and use it in GitHub Desktop.

Select an option

Save jasiek/2018757 to your computer and use it in GitHub Desktop.
Langusta 0.2.1 profile trace
/home/jps/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -I"lib:test/quality:lib:." -I"/home/jps/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib" "/home/jps/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/quality/test_*.rb"
% cumulative self self total
time seconds seconds calls ms/call ms/call name
55.46 624.54 624.54 40716 15.34 24.98 Array#include?
34.85 1016.96 392.42 43450242 0.01 0.01 Fixnum#==
1.14 1029.76 12.80 393881 0.03 0.05 Range#include?
0.94 1040.34 10.59 11030 0.96 105.86 Integer#times
0.76 1048.85 8.51 348944 0.02 0.07 Range#===
0.70 1056.70 7.85 85317 0.09 0.48 Langusta::NGram#normalize
0.56 1063.02 6.31 86501 0.07 0.35 Langusta::UnicodeBlock.of
0.55 1069.21 6.20 44937 0.14 23.39 Langusta::NGram#add_char
0.47 1074.45 5.24 598568 0.01 0.01 Fixnum#<=>
0.46 1079.62 5.16 540421 0.01 0.01 Array#[]=
0.45 1084.66 5.05 125223 0.04 0.06 Array#hash
0.43 1089.55 4.88 44937 0.11 0.54 Range#each
0.41 1094.12 4.57 118022 0.04 0.05 Array#eql?
0.39 1098.52 4.40 116140 0.04 0.15 Hash#has_key?
0.31 1102.01 3.49 134811 0.03 0.03 Langusta::NGram#get
0.28 1105.16 3.15 10633 0.30 207.59 Array#each
0.28 1108.27 3.12 337793 0.01 0.01 Fixnum#===
0.23 1110.90 2.62 10309 0.25 0.25 Array#map!
0.20 1113.19 2.29 249493 0.01 0.01 Kernel.hash
0.15 1114.91 1.72 229857 0.01 0.01 Numeric#eql?
0.12 1116.23 1.33 44937 0.03 0.09 Langusta::Guard.codepoint
0.12 1117.53 1.30 39580 0.03 25.72 Langusta::UnicodeBlock.is_upper_case?
0.11 1118.74 1.21 44985 0.03 0.04 Langusta::Guard.klass
0.10 1119.90 1.16 10309 0.11 1.77 Langusta::Detector#update_lang_prob
0.10 1121.05 1.15 304 3.78 73.01 Array#map
0.07 1121.88 0.84 92820 0.01 0.01 Array#[]
0.06 1122.56 0.68 89922 0.01 0.01 Kernel.__method__
0.05 1123.16 0.59 336 1.77 69.82 Kernel.loop
0.05 1123.71 0.55 10309 0.05 0.41 Langusta::Detector#normalize_prob
0.04 1124.16 0.45 43237 0.01 0.01 Float#/
0.04 1124.58 0.42 44985 0.01 0.01 Kernel.is_a?
0.03 1124.88 0.30 11139 0.03 0.04 Kernel.rand
0.02 1125.09 0.20 13348 0.02 0.02 String#to_i
0.01 1125.23 0.14 13522 0.01 0.01 Array#first
0.01 1125.33 0.10 2835 0.04 0.35 Class#new
0.01 1125.43 0.10 6923 0.01 0.01 Hash#[]=
0.01 1125.52 0.09 10309 0.01 0.01 Kernel.respond_to_missing?
0.01 1125.62 0.09 48 1.95 3.26 Enumerable.sort_by
0.01 1125.69 0.07 336 0.21 0.37 Langusta::Detector#next_gaussian
0.01 1125.75 0.06 7048 0.01 0.01 Float#<=>
0.00 1125.80 0.05 10309 0.00 0.00 Kernel.nil?
0.00 1125.84 0.04 2352 0.02 0.02 Langusta::Language#initialize
0.00 1125.87 0.03 2312 0.01 0.35 Langusta::NGram#cjk_map
0.00 1125.89 0.02 256 0.09 0.09 String#scan
0.00 1125.91 0.02 144 0.16 0.16 String#gsub
0.00 1125.94 0.02 830 0.03 0.03 Float#-
0.00 1125.95 0.02 1 15.62 296.88 Hash#each
0.00 1125.97 0.02 336 0.05 2.21 Langusta::Detector#init_probability
0.00 1125.98 0.02 1166 0.01 0.01 Fixnum#*
0.00 1126.00 0.02 192 0.08 0.16 Langusta.utf82cp_19
0.00 1126.02 0.02 256 0.06 3.23 Langusta::JavaPropertyReader#parse_value
0.00 1126.03 0.02 48 0.33 23012.53 Langusta::Detector#get_probabilities
0.00 1126.05 0.02 336 0.05 0.05 String#encode
0.00 1126.05 0.01 48 0.16 5.21 Enumerable.each_with_index
0.00 1126.06 0.01 144 0.05 0.22 Langusta::Codepoints.gsub19
0.00 1126.07 0.01 48 0.16 447.92 Langusta::Detector#append
0.00 1126.08 0.01 304 0.03 0.03 String#split
0.00 1126.09 0.01 144 0.05 0.54 Langusta::Codepoints.gsub!
0.00 1126.09 0.01 193 0.04 0.04 String#unpack
0.00 1126.10 0.01 144 0.05 0.11 Langusta.cp2utf8
0.00 1126.11 0.01 48 0.16 23012.70 Langusta::Detector#detect
0.00 1126.12 0.01 192 0.04 0.20 Langusta.utf82cp
0.00 1126.12 0.01 336 0.02 0.02 Math.log
0.00 1126.13 0.01 415 0.02 0.02 Float#>=
0.00 1126.14 0.01 48 0.16 23003.74 Langusta::Detector#detect_block
0.00 1126.15 0.01 1 7.81 7.81 Langusta::JavaPropertyReader#[]
0.00 1126.16 0.01 384 0.02 0.02 Array#initialize
0.00 1126.16 0.00 1 0.00 375.00 Langusta::NGram#calculate_latin1_excluded
0.00 1126.16 0.00 48 0.00 0.00 Langusta::DetectorFactory#create_detector
0.00 1126.16 0.00 48 0.00 0.00 Langusta::Detector#initialize
0.00 1126.16 0.00 12 0.00 0.00 BasicObject#singleton_method_added
0.00 1126.16 0.00 48 0.00 22442.22 Langusta::Detector#extract_ngrams
0.00 1126.16 0.00 2 0.00 0.00 String#<=>
0.00 1126.16 0.00 2 0.00 0.00 Module#private
0.00 1126.16 0.00 1 0.00 0.00 Module#attr_accessor
0.00 1126.16 0.00 29 0.00 0.00 Module#method_added
0.00 1126.16 0.00 2 0.00 0.00 Comparable.<
0.00 1126.16 0.00 4 0.00 0.00 Class#inherited
0.00 1126.16 0.00 1 0.00 0.00 Regexp#initialize
0.00 1126.16 0.00 14 0.00 0.00 IO#set_encoding
0.00 1126.16 0.00 144 0.00 0.00 Array#pack
0.00 1126.16 0.00 336 0.00 0.00 Float#==
0.00 1126.16 0.00 144 0.00 0.00 String#force_encoding
0.00 1126.16 0.00 336 0.00 0.00 Math.sqrt
0.00 1126.16 0.00 96 0.00 0.00 Array#empty?
0.00 1126.16 0.00 144 0.00 0.05 Langusta.cp2utf8_19
0.00 1126.16 0.00 1 0.00 0.00 Langusta::UnicodeBlock.compute_upper_case_table
0.00 1126.16 0.00 48 0.00 0.00 Langusta::NGram#initialize
0.00 1126.16 0.00 48 0.00 31.25 Langusta::Detector#cleaning_text
0.00 1126.16 0.00 49 0.00 0.00 IO#read
0.00 1126.16 0.00 51 0.00 0.00 IO#open
0.00 1126.16 0.00 48 0.00 0.00 Langusta::DetectorFactory#create
0.00 1126.16 0.00 1 0.00 0.00 Module#attr_reader
0.00 1126.16 0.00 51 0.00 0.00 File#initialize
0.00 1126.16 0.00 48 0.00 0.00 NilClass#nil?
0.00 1126.16 0.00 48 0.00 0.00 Array#last
0.00 1126.16 0.00 144 0.00 0.00 Array#replace
0.00 1126.16 0.00 48 0.00 0.00 Array#select
0.00 1126.16 0.00 48 0.00 8.46 Langusta::Detector#sort_probability
0.00 1126.16 0.00 2 0.00 0.00 IO#readlines
0.00 1126.16 0.00 2 0.00 425.78 Langusta::JavaPropertyReader#parse
0.00 1126.16 0.00 1 0.00 0.00 Langusta::JavaPropertyReader#underlying_hash
0.00 1126.16 0.00 1 0.00 0.00 Hash#select
0.00 1126.16 0.00 2 0.00 425.78 Langusta::JavaPropertyReader#initialize
0.00 1126.16 0.00 1 0.00 781.25 Langusta::NGram#calculate_cjk_map
0.00 1126.16 0.00 1 0.00 0.00 Dir#[]
0.00 1126.16 0.00 1 0.00 1126156.25 #toplevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment