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
| #!/usr/bin/env ruby | |
| number = 100_000 | |
| (1..10).each do |hash_size| | |
| number /= 10 if hash_size == 7 | |
| number.times do | |
| h = {} | |
| hash_size.times do |i| | |
| h[i] = true | |
| h[i] |
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/common.mk b/common.mk | |
| index 124cde3..fb8f5e7 100644 | |
| --- a/common.mk | |
| +++ b/common.mk | |
| @@ -24,7 +24,7 @@ EXTCONF = extconf.rb | |
| RBCONFIG = ./.rbconfig.time | |
| LIBRUBY_EXTS = ./.libruby-with-ext.time | |
| REVISION_H = ./.revision.time | |
| -PLATFORM_D = ./$(PLATFORM)/.time | |
| +PLATFORM_D = $(CURDIR)/$(PLATFORM) |
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/common.mk b/common.mk | |
| index de22d39..774f83f 100644 | |
| --- a/common.mk | |
| +++ b/common.mk | |
| @@ -429,6 +429,7 @@ clean-local:: PHONY | |
| @$(RM) $(OBJS) $(MINIOBJS) $(MAINOBJ) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY) $(LIBRUBY_ALIASES) | |
| @$(RM) $(PROGRAM) $(WPROGRAM) miniruby$(EXEEXT) dmyext.$(OBJEXT) $(ARCHFILE) .*.time | |
| @$(RM) y.tab.c y.output encdb.h transdb.h prelude.c config.log rbconfig.rb $(ruby_pc) | |
| + -$(Q)$(RMDIR) $(PLATFORM) 2> /dev/null || true | |
| clean-ext:: PHONY |
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/Makefile.in b/Makefile.in | |
| index a3040b6..83d525b 100644 | |
| --- a/Makefile.in | |
| +++ b/Makefile.in | |
| @@ -12,6 +12,7 @@ NULL = /dev/null | |
| srcdir = @srcdir@ | |
| top_srcdir = $(srcdir) | |
| hdrdir = $(srcdir)/include | |
| +PLATFORM = @PLATFORM@ | |
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
| On WinXP with gcc version 4.5.2 (tdm-1) | |
| # hash_bench.rb - about 14 % improvement | |
| h = {} | |
| 3000000.times do |i| | |
| h[i] = true | |
| end | |
| # hash2_bench.rb - about 50 % improvement | |
| 1000000.times do |i| |
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
| #!/usr/bin/env ruby | |
| # | |
| # https://github.com/mattetti/googlecharts | |
| # http://mattetti.github.com/googlecharts/ | |
| # | |
| # Install: | |
| # gem install googlecharts | |
| # | |
| # GitHub Flavord Markdown: | |
| #  |
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
| CPU: Intel Core 2 Duo 6600 2.40GHz | |
| RAM: 4 GB | |
| HDD: On Ramdisk 1.1GB using ImDisk | |
| AV: Off | |
| OS: Windows XP SP3 | |
| # This was run before replacing rb_file_expand_path() to funcall() in rb_expand_load_paths() of load.c. | |
| V:\test_rails>set RUBY_USE_ATTRIBUTE=1 | |
| V:\test_rails>set RUBY_CACHED_LOAD_PATH=0 |
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
| ruby 2.0.0dev (2011-12-09 trunk 33995) [i386-mingw32] | |
| Windows 7 on VirtualBox | |
| 2.4GHz Core 2 Duo | |
| Rails 3.1.3 | |
| command: ruby script/rails r "p 1" | |
| Average and standard deviation of 10 times trials | |
| +----------+--------+----------+---------+ |
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/file.c b/file.c | |
| index e566ce3..24b25b8 100644 | |
| --- a/file.c | |
| +++ b/file.c | |
| @@ -5060,7 +5060,38 @@ static int | |
| file_load_ok(const char *path) | |
| { | |
| int ret = 1; | |
| - int fd = open(path, O_RDONLY); | |
| + int fd; |
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/file.c b/file.c | |
| index e566ce3..516225d 100644 | |
| --- a/file.c | |
| +++ b/file.c | |
| @@ -5060,7 +5060,33 @@ static int | |
| file_load_ok(const char *path) | |
| { | |
| int ret = 1; | |
| - int fd = open(path, O_RDONLY); | |
| + int fd; |