This file contains hidden or 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
methodmissing@www:~$ sudo ltrace -cp 10868 | |
% time seconds usecs/call calls function | |
------ ----------- ----------- --------- -------------------- | |
95.23 14.430235 45 314661 memcpy | |
1.85 0.280341 14 19899 free | |
1.18 0.179301 14 12354 malloc | |
0.50 0.075849 13 5573 strcmp | |
0.42 0.062907 15 4164 memset | |
0.36 0.055280 14 3813 realloc | |
0.24 0.036312 13 2678 _setjmp |
This file contains hidden or 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
require 'benchmark' | |
class Hash | |
def orig_symbolize_keys! | |
keys.each do |key| | |
self[(key.to_sym rescue key) || key] = delete(key) | |
end | |
self | |
end |
This file contains hidden or 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
require 'benchmark' | |
class Hash | |
def orig_symbolize_keys! | |
keys.each do |key| | |
self[(key.to_sym rescue key) || key] = delete(key) | |
end | |
self | |
end |
This file contains hidden or 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/eventmachine.gemspec b/eventmachine.gemspec | |
index 6e4fedc..d8acfad 100644 | |
--- a/eventmachine.gemspec | |
+++ b/eventmachine.gemspec | |
@@ -20,7 +20,7 @@ using TCP/IP, especially if custom protocols are required. | |
} | |
s.email = %q{[email protected]} | |
s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"] | |
- s.files = [".gitignore", "README", "Rakefile", "docs/COPYING", "docs/ChangeLog", "docs/DEFERRABLES", "docs/EPOLL", "docs/GNU", "docs/INSTALL", "docs/KEYBOARD", "docs/LEGAL", "docs/LIGHTWEIGHT_CONCURRENCY", "docs/PURE_RUBY", "docs/RELEASE_NOTES", "docs/SMTP", "docs/SPAWNED_PROCESSES", "docs/TODO", "eventmachine.gemspec", "examples/ex_channel.rb", "examples/ex_queue.rb", "examples/helper.rb", "ext/binder.cpp", "ext/binder.h", "ext/cmain.cpp", "ext/cplusplus.cpp", "ext/ed.cpp", "ext/ed.h", "ext/em.cpp", "ext/em.h", "ext/emwin.cpp", "ext/emwin.h", "ext/epoll.cpp", "ext/epoll.h", "ext/eventmachine.h", "ext/eventmachine_cpp.h", "ext/extconf.rb", "ext/fastfilereader/extconf.rb", "ext/fast |
This file contains hidden or 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/eventmachine.gemspec b/eventmachine.gemspec | |
index 6e4fedc..d8acfad 100644 | |
--- a/eventmachine.gemspec | |
+++ b/eventmachine.gemspec | |
@@ -20,7 +20,7 @@ using TCP/IP, especially if custom protocols are required. | |
} | |
s.email = %q{[email protected]} | |
s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"] | |
- s.files = [".gitignore", "README", "Rakefile", "docs/COPYING", "docs/ChangeLog", "docs/DEFERRABLES", "docs/EPOLL", "docs/GNU", "docs/INSTALL", "docs/KEYBOARD", "docs/LEGAL", "docs/LIGHTWEIGHT_CONCURR | |
+ s.files = [".gitignore", "README", "Rakefile", "docs/COPYING", "docs/ChangeLog", "docs/DEFERRABLES", "docs/EPOLL", "docs/GNU", "docs/INSTALL", "docs/KEYBOARD", "docs/LEGAL", "docs/LIGHTWEIGHT_CONCURR |
This file contains hidden or 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
Benchmark File | Input Size | RBS-ruby-100205.001747 | RBS-ruby-100205.020911 | RBS-ruby-100205.224359 | |
---|---|---|---|---|---|
macro-benchmarks/bm_dirp.rb | 10000 | 0.68319 | 0.652077 | 0.685246 | |
macro-benchmarks/bm_list.rb | 1000 | 0.055925 | 0.056056 | 0.056541 | |
macro-benchmarks/bm_list.rb | 10000 | 4.752666 | 4.764763 | 4.917335 | |
macro-benchmarks/bm_mpart.rb | 300 | 0.099293 | 0.094168 | 0.091411 | |
macro-benchmarks/bm_norvig_spelling.rb | 50 | 9.678383 | 9.480905 | 9.71165 | |
macro-benchmarks/bm_parse_log.rb | 100 | 1.369653 | 0.26482 | 1.360127 | |
macro-benchmarks/bm_pi.rb | 1000 | 0.027939 | 0.028057 | 0.028157 | |
macro-benchmarks/bm_pi.rb | 10000 | 2.178629 | 2.189743 | 2.197385 | |
macro-benchmarks/bm_rcs.rb | 100 | 0.933577 | 0.943785 | 0.932224 |
This file contains hidden or 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
static inline int | |
is_pointer_to_heap(ptr) | |
void *ptr; | |
{ | |
RVALUE *p = RANY(ptr); | |
struct heaps_slot *heap; | |
if (p < lomem || p > himem || (VALUE)p % sizeof(RVALUE)) return Qfalse; | |
/* check if p looks like a pointer */ |
This file contains hidden or 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
case NODE_SCOPE: /* 2,3 */ | |
case NODE_BLOCK_PASS: | |
case NODE_CDECL: | |
gc_mark((VALUE)obj->as.node.u3.node); | |
ptr = (VALUE)obj->as.node.u2.node; | |
goto again; |
This file contains hidden or 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
static void | |
mark_locations_array(x, n) | |
VALUE *x; | |
size_t n; | |
{ | |
VALUE v; | |
while (n--) { | |
v = *x; | |
if (is_pointer_to_heap((void *)v)) { | |
gc_mark(v); |
This file contains hidden or 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
methodmissing:google-perftools-1.5 lourens$ make | |
/bin/sh ./libtool --tag=CXX --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined -o libtcmalloc_minimal.la -rpath /opt/local/lib -D_THREAD_SAFE libtcmalloc_minimal_la-tcmalloc.lo libtcmalloc_minimal_internal.la | |
rm -fr .libs/libtcmalloc_minimal.lax | |
rm -fr .libs/libtcmalloc_minimal.lax | |
mkdir .libs/libtcmalloc_minimal.lax | |
rm -fr .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a | |
mkdir .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a | |
Extracting /Users/lourens/installs/google-perftools-1.5/./.libs/libtcmalloc_minimal_internal.a | |
(cd .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a && ar x /Users/lourens/installs/google-perftools-1.5/./.libs/libtcmalloc_minimal_internal.a) | |
g++ -dynamiclib -o .libs/libtcmalloc_minimal.0.0.0.dylib .libs/libtcmalloc_minimal_la-tcmalloc.o .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a/atomicops-internals-x86.o .libs/libtcmalloc_minima |