Created
November 27, 2011 17:56
-
-
Save shirosaki/1397904 to your computer and use it in GitHub Desktop.
profile result of tcs-ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/common.mk b/common.mk | |
index ea244cc..55b6f46 100644 | |
--- a/common.mk | |
+++ b/common.mk | |
@@ -93,6 +93,8 @@ COMMONOBJS = array.$(OBJEXT) \ | |
vm_dump.$(OBJEXT) \ | |
thread.$(OBJEXT) \ | |
cont.$(OBJEXT) \ | |
+ fenix.$(OBJEXT) \ | |
+ fenix_file.$(OBJEXT) \ | |
$(BUILTIN_ENCOBJS) \ | |
$(BUILTIN_TRANSOBJS) \ | |
$(MISSING) | |
@@ -619,6 +621,10 @@ eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h {$(VPATH)}vm.h \ | |
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \ | |
{$(VPATH)}eval_jump.c {$(VPATH)}debug.h {$(VPATH)}gc.h {$(VPATH)}iseq.h \ | |
$(ENCODING_H_INCLUDES) {$(VPATH)}internal.h | |
+fenix.$(OBJEXT): {$(VPATH)}fenix.c $(RUBY_H_INCLUDES) {$(VPATH)}fenix.h \ | |
+ {$(VPATH)}fenix_file.h {$(VPATH)}internal.h | |
+fenix_file.$(OBJEXT): {$(VPATH)}fenix_file.c $(RUBY_H_INCLUDES) {$(VPATH)}fenix.h \ | |
+ {$(VPATH)}fenix_file.h {$(VPATH)}internal.h | |
load.$(OBJEXT): {$(VPATH)}load.c {$(VPATH)}eval_intern.h \ | |
{$(VPATH)}util.h $(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) \ | |
{$(VPATH)}dln.h {$(VPATH)}debug.h \ | |
diff --git a/fenix.c b/fenix.c | |
new file mode 100644 | |
index 0000000..e49bc0c | |
--- /dev/null | |
+++ b/fenix.c | |
@@ -0,0 +1,10 @@ | |
+#include "fenix.h" | |
+ | |
+VALUE mFenix; | |
+ | |
+void Init_fenix() | |
+{ | |
+ mFenix = rb_define_module("Fenix"); | |
+ | |
+ Init_fenix_file(); | |
+} | |
diff --git a/fenix.h b/fenix.h | |
new file mode 100644 | |
index 0000000..630f011 | |
--- /dev/null | |
+++ b/fenix.h | |
@@ -0,0 +1,11 @@ | |
+#ifndef FENIX_H | |
+#define FENIX_H | |
+ | |
+#include <ruby.h> | |
+#include "fenix_file.h" | |
+ | |
+#define IS_DIR_SEPARATOR_P(c) (c == L'\\' || c == L'/') | |
+ | |
+extern VALUE mFenix; | |
+ | |
+#endif | |
diff --git a/fenix_file.c b/fenix_file.c | |
new file mode 100644 | |
index 0000000..616a623 | |
--- /dev/null | |
+++ b/fenix_file.c | |
@@ -0,0 +1,287 @@ | |
+#include "fenix.h" | |
+ | |
+static inline void | |
+fenix_replace_wchar(wchar_t *s, int find, int replace) | |
+{ | |
+ while (*s != 0) { | |
+ if (*s == find) | |
+ *s = replace; | |
+ s++; | |
+ } | |
+} | |
+ | |
+/* | |
+ Return user's home directory using environment variables combinations. | |
+ Memory allocated by this function should be manually freeded afterwards. | |
+*/ | |
+static wchar_t * | |
+fenix_home_dir() | |
+{ | |
+ wchar_t *buffer = NULL; | |
+ size_t buffer_len = 0, len = 0; | |
+ size_t home_env = 0; | |
+ | |
+ // determine User's home directory trying: | |
+ // HOME, HOMEDRIVE + HOMEPATH and USERPROFILE environment variables | |
+ // TODO: Special Folders - Profile and Personal | |
+ | |
+ /* | |
+ GetEnvironmentVariableW when used with NULL will return the required | |
+ buffer size and its terminating character. | |
+ http://msdn.microsoft.com/en-us/library/windows/desktop/ms683188(v=vs.85).aspx | |
+ */ | |
+ | |
+ if (len = GetEnvironmentVariableW(L"HOME", NULL, 0)) { | |
+ buffer_len = len; | |
+ home_env = 1; | |
+ } else if (len = GetEnvironmentVariableW(L"HOMEDRIVE", NULL, 0)) { | |
+ buffer_len = len; | |
+ if (len = GetEnvironmentVariableW(L"HOMEPATH", NULL, 0)) { | |
+ buffer_len += len; | |
+ home_env = 2; | |
+ } else { | |
+ buffer_len = 0; | |
+ } | |
+ } else if (len = GetEnvironmentVariableW(L"USERPROFILE", NULL, 0)) { | |
+ buffer_len = len; | |
+ home_env = 3; | |
+ } | |
+ | |
+ // allocate buffer | |
+ if (home_env) | |
+ buffer = (wchar_t *)malloc(buffer_len * sizeof(wchar_t)); | |
+ | |
+ switch (home_env) { | |
+ case 1: // HOME | |
+ GetEnvironmentVariableW(L"HOME", buffer, buffer_len); | |
+ break; | |
+ case 2: // HOMEDRIVE + HOMEPATH | |
+ len = GetEnvironmentVariableW(L"HOMEDRIVE", buffer, buffer_len); | |
+ GetEnvironmentVariableW(L"HOMEPATH", buffer + len, buffer_len - len); | |
+ break; | |
+ case 3: // USERPROFILE | |
+ GetEnvironmentVariableW(L"USERPROFILE", buffer, buffer_len); | |
+ break; | |
+ default: | |
+ // wprintf(L"Failed to determine user home directory.\n"); | |
+ break; | |
+ } | |
+ | |
+ if (home_env) { | |
+ // sanitize backslashes with forwardslashes | |
+ fenix_replace_wchar(buffer, L'\\', L'/'); | |
+ | |
+ // wprintf(L"home dir: '%s' using home_env (%i)\n", buffer, home_env); | |
+ return buffer; | |
+ } | |
+ | |
+ return NULL; | |
+} | |
+ | |
+static VALUE | |
+fenix_coerce_to_path(VALUE obj) | |
+{ | |
+ VALUE tmp; | |
+ ID to_path; | |
+ | |
+ CONST_ID(to_path, "to_path"); | |
+ tmp = rb_check_funcall(obj, to_path, 0, 0); | |
+ if (tmp == Qundef) | |
+ tmp = obj; | |
+ | |
+ return StringValue(tmp); | |
+} | |
+ | |
+// TODO: can we fail allocating memory? | |
+static VALUE | |
+fenix_file_expand_path(int argc, VALUE *argv) | |
+{ | |
+ size_t size = 0, wpath_len = 0, wdir_len = 0, whome_len = 0; | |
+ size_t buffer_len = 0; | |
+ char *fullpath = NULL; | |
+ wchar_t *wfullpath = NULL, *wpath = NULL, *wpath_pos = NULL, *wdir = NULL; | |
+ wchar_t *whome = NULL, *buffer = NULL, *buffer_pos = NULL; | |
+ UINT cp; | |
+ VALUE result = Qnil, path = Qnil, dir = Qnil; | |
+ | |
+ // retrieve path and dir from argv | |
+ rb_scan_args(argc, argv, "11", &path, &dir); | |
+ | |
+ // coerce them to string | |
+ path = fenix_coerce_to_path(path); | |
+ if (!NIL_P(dir)) | |
+ dir = fenix_coerce_to_path(dir); | |
+ | |
+ // convert char * to wchar_t | |
+ // path | |
+ if (!NIL_P(path)) { | |
+ size = MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(path), -1, NULL, 0) + 1; | |
+ wpath = wpath_pos = (wchar_t *)malloc(size * sizeof(wchar_t)); | |
+ MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(path), -1, wpath, size); | |
+ wpath_len = wcslen(wpath); | |
+ // wprintf(L"wpath: '%s' with (%i) characters long.\n", wpath, wpath_len); | |
+ } | |
+ | |
+ // dir | |
+ if (!NIL_P(dir)) { | |
+ size = MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(dir), -1, NULL, 0) + 1; | |
+ wdir = (wchar_t *)malloc(size * sizeof(wchar_t)); | |
+ MultiByteToWideChar(CP_UTF8, 0, RSTRING_PTR(dir), -1, wdir, size); | |
+ wdir_len = wcslen(wdir); | |
+ // wprintf(L"wdir: '%s' with (%i) characters long.\n", wdir, wdir_len); | |
+ } | |
+ | |
+ /* determine if we need the user's home directory */ | |
+ if ((wpath_len == 1 && wpath_pos[0] == L'~') || | |
+ (wpath_len >= 2 && wpath_pos[0] == L'~' && IS_DIR_SEPARATOR_P(wpath_pos[1]))) { | |
+ // wprintf(L"wpath requires expansion.\n"); | |
+ whome = fenix_home_dir(); | |
+ whome_len = wcslen(whome); | |
+ | |
+ // wprintf(L"whome: '%s' with (%i) characters long.\n", whome, whome_len); | |
+ | |
+ /* ignores dir since we are expading home */ | |
+ wdir_len = 0; | |
+ | |
+ /* exclude ~ from the result */ | |
+ wpath_pos++; | |
+ wpath_len--; | |
+ | |
+ /* exclude separator if present */ | |
+ if (wpath_len && IS_DIR_SEPARATOR_P(wpath_pos[0])) { | |
+ // wprintf(L"excluding expansion character and separator\n"); | |
+ wpath_pos++; | |
+ wpath_len--; | |
+ } | |
+ } else if (wpath_len >= 2 && wpath_pos[1] == L':') { | |
+ /* ignore dir since path contains a drive letter */ | |
+ // wprintf(L"Ignore dir since we have drive letter\n"); | |
+ wdir_len = 0; | |
+ } | |
+ | |
+ // wprintf(L"wpath_len: %i\n", wpath_len); | |
+ // wprintf(L"wdir_len: %i\n", wdir_len); | |
+ // wprintf(L"whome_len: %i\n", whome_len); | |
+ | |
+ buffer_len = wpath_len + 1 + wdir_len + 1 + whome_len + 1; | |
+ // wprintf(L"buffer_len: %i\n", buffer_len + 1); | |
+ | |
+ buffer = buffer_pos = (wchar_t *)malloc((buffer_len + 1) * sizeof(wchar_t)); | |
+ | |
+ /* add home */ | |
+ if (whome_len) { | |
+ // wprintf(L"Copying whome...\n"); | |
+ wcsncpy(buffer_pos, whome, whome_len); | |
+ buffer_pos += whome_len; | |
+ } | |
+ | |
+ /* Add separator if required */ | |
+ if (whome_len && wcsrchr(L"\\/:", buffer_pos[-1]) == NULL) { | |
+ // wprintf(L"Adding separator after whome\n"); | |
+ buffer_pos[0] = L'\\'; | |
+ buffer_pos++; | |
+ } | |
+ | |
+ if (wdir_len) { | |
+ // wprintf(L"Copying wdir...\n"); | |
+ wcsncpy(buffer_pos, wdir, wdir_len); | |
+ buffer_pos += wdir_len; | |
+ } | |
+ | |
+ /* add separator if required */ | |
+ if (wdir_len && wcsrchr(L"\\/:", buffer_pos[-1]) == NULL) { | |
+ // wprintf(L"Adding separator after wdir\n"); | |
+ buffer_pos[0] = L'\\'; | |
+ buffer_pos++; | |
+ } | |
+ | |
+ /* now deal with path */ | |
+ if (wpath_len) { | |
+ // wprintf(L"Copying wpath...\n"); | |
+ wcsncpy(buffer_pos, wpath_pos, wpath_len); | |
+ buffer_pos += wpath_len; | |
+ } | |
+ | |
+ /* GetFullPathNameW requires at least "." to determine current directory */ | |
+ if (wpath_len == 0) { | |
+ // wprintf(L"Adding '.' to buffer\n"); | |
+ buffer_pos[0] = L'.'; | |
+ buffer_pos++; | |
+ } | |
+ | |
+ /* Ensure buffer is NULL terminated */ | |
+ buffer_pos[0] = L'\0'; | |
+ | |
+ // wprintf(L"buffer: '%s'\n", buffer); | |
+ | |
+ // FIXME: Make this more robust | |
+ // Determine require buffer size | |
+ size = GetFullPathNameW(buffer, 0, NULL, NULL); | |
+ if (size) { | |
+ // allocate enough memory to contain the response | |
+ wfullpath = (wchar_t *)malloc(size * sizeof(wchar_t)); | |
+ GetFullPathNameW(buffer, size, wfullpath, NULL); | |
+ | |
+ /* Calculate the new size and leave the garbage out */ | |
+ size = wcslen(wfullpath); | |
+ | |
+ /* Remove any trailing slashes */ | |
+ if (IS_DIR_SEPARATOR_P(wfullpath[size - 1]) && wfullpath[size - 2] != L':') { | |
+ // wprintf(L"Removing trailing slash\n"); | |
+ wfullpath[size - 1] = L'\0'; | |
+ } | |
+ | |
+ // sanitize backslashes with forwardslashes | |
+ fenix_replace_wchar(wfullpath, L'\\', L'/'); | |
+ // wprintf(L"wfullpath: '%s'\n", wfullpath); | |
+ | |
+ // What CodePage should we use? | |
+ cp = AreFileApisANSI() ? CP_ACP : CP_OEMCP; | |
+ | |
+ // convert to char * | |
+ size = WideCharToMultiByte(cp, 0, wfullpath, -1, NULL, 0, NULL, NULL) + 1; | |
+ fullpath = (char *)malloc(size * sizeof(char)); | |
+ WideCharToMultiByte(cp, 0, wfullpath, -1, fullpath, size, NULL, NULL); | |
+ | |
+ // convert to VALUE and set the filesystem encoding | |
+ result = rb_filesystem_str_new_cstr(fullpath); | |
+ } | |
+ | |
+ // TODO: better cleanup | |
+ if (buffer) | |
+ free(buffer); | |
+ | |
+ if (wpath) | |
+ free(wpath); | |
+ | |
+ if (wdir) | |
+ free(wdir); | |
+ | |
+ if (whome) | |
+ free(whome); | |
+ | |
+ if (wfullpath) | |
+ free(wfullpath); | |
+ | |
+ if (fullpath) | |
+ free(fullpath); | |
+ | |
+ return result; | |
+} | |
+ | |
+static VALUE | |
+fenix_file_replace() | |
+{ | |
+ rb_define_singleton_method(rb_cFile, "expand_path", fenix_file_expand_path, -1); | |
+ return Qtrue; | |
+} | |
+ | |
+VALUE cFenixFile; | |
+ | |
+void Init_fenix_file() | |
+{ | |
+ cFenixFile = rb_define_class_under(mFenix, "File", rb_cObject); | |
+ | |
+ rb_define_singleton_method(cFenixFile, "replace!", fenix_file_replace, 0); | |
+ rb_define_singleton_method(cFenixFile, "expand_path", fenix_file_expand_path, -1); | |
+} | |
diff --git a/fenix_file.h b/fenix_file.h | |
new file mode 100644 | |
index 0000000..c625dba | |
--- /dev/null | |
+++ b/fenix_file.h | |
@@ -0,0 +1,6 @@ | |
+#ifndef FENIX_FILE_H | |
+#define FENIX_FILE_H | |
+ | |
+void Init_fenix_file(); | |
+ | |
+#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails 3.1.3 with tcs-ruby | |
Fenix is merged to ruby base code by above patch. | |
Create new rails project and profile in AQTime. | |
* Profiling command | |
ruby -rfenix/replace script/rails runner "puts 1" | |
* Result capture | |
http://i.imgur.com/nEBSx.png | |
* Result text | |
created by terminal-table | |
https://github.com/visionmedia/terminal-table | |
+-------------------------------------+--------------------+--------------------+-------------------+-----------+ | |
| Routine Name | Time | Time with Children | Shared Time | Hit Count | | |
+-------------------------------------+--------------------+--------------------+-------------------+-----------+ | |
| timer_thread_func@4 | 67.4053070002366 | 67.408214436015 | 99.995686822737 | 1 | | |
| rb_w32_open | 2.41926378078074 | 2.41926378078074 | 100 | 25036 | | |
| gc_mark | 1.66473011644696 | 3.83228062961634 | 43.4396714995694 | 8328535 | | |
| <Root> | 1.27794887022512 | 94.2623810750167 | 1.35573582552311 | 7 | | |
| gc_mark_children | 1.17345611337361 | 3.69316856686447 | 31.773694921537 | 2808315 | | |
| st_lookup | 1.01877790816538 | 2.1666026327868 | 47.0219085285135 | 1632412 | | |
| vm_xmalloc.clone.10 | 0.999021167392139 | 4.83545132361844 | 20.6603499969586 | 1320337 | | |
| call_cfunc | 0.906473985192532 | 25.2086461885451 | 3.59588523085558 | 478185 | | |
| ruby_xfree | 0.793535886607398 | 0.793535886607398 | 100 | 1326391 | | |
| rb_w32_read | 0.725336083024095 | 0.726766602712966 | 99.8031665622043 | 1795 | | |
| ruby_yyparse | 0.657575189946128 | 3.61539591059616 | 18.1881931109917 | 1177 | | |
| winnt_stat | 0.657461434550958 | 0.667309619836311 | 98.5241955169524 | 10850 | | |
| dln_load | 0.530083003802962 | 0.76547374046589 | 69.2490121843158 | 29 | | |
| st_foreach | 0.48113114635024 | 5.20479400559511 | 9.24399977853163 | 277058 | | |
| rb_w32_isatty | 0.38084337091834 | 0.38084337091834 | 100 | 822 | | |
| vm_exec_core | 0.350306558309247 | 25.2029437688398 | 1.3899430222209 | 238208 | | |
| rb_safe_level | 0.291761173433118 | 0.291761173433118 | 100 | 1722006 | | |
| iseq_mark | 0.287493554687386 | 3.18474491555742 | 9.02720821636249 | 299138 | | |
| mark_method_entry_i | 0.273704626595222 | 3.18865895379145 | 8.58369084187492 | 640795 | | |
| rb_enc_precise_mbclen | 0.2673729063288 | 0.407052717761537 | 65.6850807431373 | 1003291 | | |
| str_new | 0.251882356370623 | 0.72485714381478 | 34.7492410773543 | 333485 | | |
| parser_tokadd_mbchar | 0.228406966437215 | 0.568329093502645 | 40.1892088665617 | 862857 | | |
| transcode_restartable0 | 0.21480273138613 | 0.229426141238248 | 93.6260925746329 | 114491 | | |
| slot_sweep | 0.198026445000368 | 0.5880825027178 | 33.6732421191239 | 5968 | | |
| vm_call_method | 0.197835011521392 | 25.2025960630988 | 0.784978702297492 | 461519 | | |
| rb_str_hash | 0.197421631895381 | 0.358642089316692 | 55.0469779694629 | 326933 | | |
| sv_i | 0.178915284374587 | 0.673420195748435 | 26.568149500735 | 155237 | | |
| st_insert | 0.178868102569993 | 0.584955201755443 | 30.578085643689 | 214583 | | |
| transcode_search_path | 0.163277040244069 | 0.901069938282702 | 18.120351518468 | 56926 | | |
| rb_str_free | 0.162375135615173 | 0.312430677916028 | 51.9715722854894 | 527105 | | |
| mark_entry | 0.160852543813863 | 3.61187771844508 | 4.45343271153462 | 607363 | | |
| st_numhash | 0.159858496474427 | 0.159858496474427 | 100 | 706758 | | |
| rb_newobj | 0.159453904631289 | 0.674646300732204 | 23.6351854976795 | 695532 | | |
| rb_method_entry | 0.15342624913232 | 0.284314022895415 | 53.963658763591 | 544090 | | |
| rb_class_of | 0.147304007303959 | 0.147304007303959 | 100 | 799053 | | |
| rb_funcall | 0.14330822235023 | 9.98962972703758 | 1.43456991165906 | 138197 | | |
| onigenc_ascii_is_code_ctype | 0.141220808327499 | 0.141220808327499 | 100 | 1094345 | | |
| rb_io_getline_1 | 0.140995182254364 | 0.75098316052369 | 18.7747461815312 | 87438 | | |
| rb_str_new_frozen | 0.138606156328021 | 0.332098504161014 | 41.7364590901077 | 197253 | | |
| strcasehash | 0.138508190534691 | 0.138508190534691 | 100 | 750591 | | |
| rb_any_hash | 0.132454198581618 | 1.07615787847309 | 12.3080638288455 | 302837 | | |
| rb_str_conv_enc_opts.clone.4 | 0.129458402974299 | 5.53586554815246 | 2.33853950837922 | 65809 | | |
| rb_econv_open | 0.126086579600223 | 4.82261239511261 | 2.61448711341602 | 57022 | | |
| rb_hash_aset | 0.12246410060426 | 1.17162062910043 | 10.4525387794074 | 117765 | | |
| us_ascii_mbc_enc_len | 0.120865111570434 | 0.120865111570434 | 100 | 850043 | | |
| st_insert2 | 0.120077160683759 | 0.747345221803926 | 16.0671610897464 | 95866 | | |
| foreach_safe_i | 0.1200711169819 | 0.92069569520236 | 13.0413466259891 | 312640 | | |
| rb_enc_associate_index | 0.116369554663706 | 0.171509674937121 | 67.85014006141 | 378208 | | |
| iseq_compile_each | 0.115487292696194 | 0.949906401035501 | 12.1577549714688 | 163996 | | |
| rb_check_funcall | 0.113356000691982 | 0.234735970777818 | 48.2908521929415 | 137937 | | |
| rb_ary_modify | 0.11153856726106 | 0.166181348274429 | 67.118583655289 | 433171 | | |
| onig_is_code_in_cc | 0.108844739909681 | 0.160853430912641 | 67.6670303468966 | 526339 | | |
| rb_intern3 | 0.10881056076278 | 0.852122285619356 | 12.7693598206615 | 123104 | | |
| i_apply_case_fold | 0.104779967162402 | 0.266710031327101 | 39.2860990796018 | 526339 | | |
| rb_filesystem_str_new_cstr | 0.0942705776971134 | 5.93119239549915 | 1.58940346916836 | 65148 | | |
| rb_w32_special_folder | 0.0927980067526682 | 0.163351880116058 | 56.8086554539424 | 1 | | |
| rb_enc_get_index | 0.0886955400815198 | 0.0886988581923445 | 99.9962591279162 | 583141 | | |
| vm_exec | 0.0884811323830777 | 25.2029278830061 | 0.351074814774751 | 225762 | | |
| invoke_block_from_c | 0.0870716227736019 | 24.021473021831 | 0.362474119278489 | 226083 | | |
| str_replace_shared | 0.0833427331065052 | 0.128231212964929 | 64.9941080486383 | 206306 | | |
| rb_obj_class | 0.0803925337880586 | 0.0803925337880586 | 100 | 312886 | | |
| rb_hash_start | 0.0803506039780303 | 0.0803506039780303 | 100 | 468234 | | |
| vm_call0 | 0.0790819657385458 | 20.1578491093238 | 0.392313511772283 | 164596 | | |
| str_buf_cat | 0.0788614950078115 | 0.20381700097384 | 38.6923046806744 | 181913 | | |
| st_hash | 0.0776777589710782 | 0.0776777589710782 | 100 | 342325 | | |
| rb_w32_close | 0.0775390925311144 | 0.0784402554597051 | 98.8511473817756 | 1622 | | |
| rb_ary_collect | 0.0753968809334659 | 1.82017568563087 | 4.14228590837007 | 3787 | | |
| st_add_direct | 0.0739911600888325 | 0.288539286561595 | 25.6433572601343 | 143538 | | |
| st_strcasecmp | 0.0732832451785471 | 0.0732832451785471 | 100 | 352004 | | |
| rb_enc_str_coderange | 0.0708004187469308 | 0.158693496669866 | 44.6145684811639 | 168807 | | |
| rb_scan_args | 0.0703990471017732 | 0.122763810561368 | 57.345113987466 | 80432 | | |
| rb_id2str | 0.0699452231674774 | 0.273047154029283 | 25.6165362412003 | 172740 | | |
| str_independent | 0.0685191032532181 | 0.102619795071257 | 66.7698695028967 | 203589 | | |
| fill_random_seed | 0.0681706974143502 | 0.0681722530939694 | 99.9977180164237 | 1 | | |
| rb_type | 0.0678751674532365 | 0.0678751674532365 | 100 | 261169 | | |
| rb_enc_set_index | 0.0661016082217528 | 0.0661016082217528 | 100 | 350176 | | |
| rb_enc_get | 0.065576270510602 | 0.0962942828153739 | 68.0998586762748 | 191229 | | |
| rb_yield | 0.0655202504959189 | 24.0181806545203 | 0.27279439453957 | 206872 | | |
| CreateChild.clone.2 | 0.0644864408762961 | 0.0644864408762961 | 100 | 5 | | |
| compile_tree | 0.0642298478699304 | 0.135750828252738 | 47.3145163802231 | 46300 | | |
| list_i | 0.0634501237633486 | 0.125824594663767 | 50.427441417874 | 154373 | | |
| rb_ary_push_1 | 0.062256645188449 | 0.0674810859026317 | 92.2579184310682 | 423709 | | |
| rb_node_newnode | 0.0607780347444125 | 0.360050129393043 | 16.8804368566315 | 313284 | | |
| rb_str_hash_cmp | 0.0583065666230143 | 0.10051056959662 | 58.0103832432914 | 195986 | | |
| rb_enc_from_index | 0.0574969963280817 | 0.0574969963280817 | 100 | 336181 | | |
| coderange_scan | 0.0560984029502288 | 0.0878725082412275 | 63.84067562545 | 186961 | | |
| rb_ary_diff | 0.0550891211285568 | 1.09344271913178 | 5.03813507234279 | 471 | | |
| ary_new | 0.0544267003920303 | 0.372764946014186 | 14.6008096989782 | 98718 | | |
| new_insn_body | 0.0540282484826896 | 0.235793657264076 | 22.9133595490149 | 303827 | | |
| iseq_setup | 0.0514628084034831 | 0.105033883324042 | 48.9963874273926 | 12379 | | |
| onigenc_unicode_apply_all_case_fold | 0.0508364107690628 | 0.286016137687466 | 17.7739658958029 | 251 | | |
| rb_isdigit | 0.0506629159317894 | 0.0506629159317894 | 100 | 270697 | | |
| compile_length_tree | 0.0500757082286516 | 0.0538081740258291 | 93.0633851366414 | 84790 | | |
| unescape_nonascii | 0.0494507654194182 | 0.278137116704033 | 17.7792759216811 | 5497 | | |
| search_nonascii | 0.0483096819828119 | 0.0483096819828119 | 100 | 271595 | | |
| mark_const_entry_i | 0.0480231226032301 | 2.56118933634889 | 1.87503211580951 | 137966 | | |
| rb_is_const_id | 0.0470720964028253 | 0.0470720964028253 | 100 | 162912 | | |
| rb_string_value | 0.0462319970509895 | 0.0699623083285466 | 66.0812917062166 | 124781 | | |
| code_to_mbclen | 0.0445330058047542 | 0.0445330058047542 | 100 | 496675 | | |
| rb_str_comparable | 0.0429121746424666 | 0.0429830828725006 | 99.8350322375798 | 199572 | | |
| rb_str_buf_cat | 0.042233494070309 | 0.162715759273904 | 25.9553802648066 | 138313 | | |
| rb_get_path_check | 0.0414110665161573 | 0.170530071633306 | 24.2837325519949 | 27682 | | |
| ruby_xcalloc | 0.0409486602898942 | 0.0409486602898942 | 100 | 68851 | | |
| mark_keyvalue | 0.0405462351361452 | 1.54101649035861 | 2.63113570749069 | 104252 | | |
| w32_wait_events | 0.0403615080566941 | 0.0403615080566941 | 100 | 1922 | | |
| rb_w32_system_tmpdir | 0.0401064543411024 | 0.0401064543411024 | 100 | 1 | | |
| rb_get_expanded_load_path | 0.0398092081737313 | 4.69190865631542 | 0.848465114940956 | 759 | | |
| rb_w32_ustati64 | 0.0386761577926628 | 0.709863477590796 | 5.4483938128393 | 10820 | | |
| transcode_restartable | 0.0381123020928851 | 0.267538443331133 | 14.2455422922953 | 114491 | | |
| rb_econv_add_transcoder_at | 0.0380256946097733 | 3.52032502020055 | 1.08017567672223 | 57026 | | |
| rb_find_file_ext_safe | 0.0368395002462512 | 4.87364040829182 | 0.755892867753926 | 776 | | |
| trans_open_i | 0.036015989767632 | 0.150732897057454 | 23.8939146468498 | 56928 | | |
| rb_enc_find_index | 0.0358264351226852 | 0.34207655843824 | 10.4732213415183 | 114072 | | |
| rb_trans_conv | 0.0341000202956098 | 0.301638463626743 | 11.3049310375106 | 57367 | | |
| rb_ary_free | 0.0340502137544139 | 0.0491756752899302 | 69.2419850945827 | 85669 | | |
| str_replace | 0.0332275865925314 | 0.0827536163130081 | 40.1524284653025 | 54443 | | |
| node_newnode.clone.7 | 0.0327524260626155 | 0.198594566002181 | 16.4921058626829 | 119110 | | |
| vm_setup_method.clone.12 | 0.03264359824692 | 0.0619120890473098 | 52.7257257011237 | 93435 | | |
| rb_thread_io_blocking_region | 0.0320428512564642 | 0.799540910791972 | 4.00765624672347 | 1795 | | |
| rb_update_max_fd | 0.0315976180186717 | 0.0315976180186717 | 100 | 1512 | | |
| assign_heap_slot | 0.0312423255029806 | 0.0312423255029806 | 100 | 151 | | |
| rb_io_taint_check | 0.0311473042388489 | 0.0441844894462375 | 70.4937516065408 | 88989 | | |
| ruby_xrealloc2 | 0.0306974447241986 | 0.0306974447241986 | 100 | 21741 | | |
| optimize_node_left | 0.0306155563880678 | 0.0375994463784197 | 81.4255510039629 | 44247 | | |
| prep_io | 0.0304096616441708 | 0.377804576864237 | 8.04904532829375 | 711 | | |
| ruby_stack_check | 0.0302789614436833 | 0.0302789614436833 | 100 | 164591 | | |
| rb_locale_encindex | 0.0293416690956056 | 0.0472897902748552 | 62.0465198197487 | 109 | | |
| st_init_strcasetable | 0.0277789384908954 | 0.0826043681419553 | 33.6288977395934 | 57017 | | |
| rb_filesystem_encoding | 0.0273460040309029 | 0.097995415117163 | 27.905391286121 | 65472 | | |
| rb_feature_p | 0.0269722732238417 | 4.78521653559249 | 0.563658363696223 | 2413 | | |
| exec_recursive | 0.026919580564973 | 0.40469387630612 | 6.65183788069242 | 14389 | | |
| rb_econv_convert | 0.0265160636619937 | 0.328154527288737 | 8.0803589336626 | 57316 | | |
| ivar_get | 0.0264804658294106 | 0.0536449297809251 | 49.362476449408 | 59470 | | |
| rb_str_coderange_scan_restartable | 0.0261713919584841 | 0.0428619340069847 | 61.0597551529506 | 89898 | | |
| realpath_rec | 0.025609959286444 | 0.910656265119865 | 2.81225312638387 | 709 | | |
+-------------------------------------+--------------------+--------------------+-------------------+-----------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment