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
ruby -wIlib bin/coderay bin/coderay -count | |
1337 |
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
ruby-1.8.7 > @foo = 42 | |
=> 42 | |
ruby-1.8.7 > @foo | |
=> 42 | |
ruby-1.8.7 > @foo = nil | |
=> nil | |
ruby-1.8.7 > @foo | |
=> nil | |
ruby-1.8.7 > remove_instance_variable :@foo | |
=> nil |
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
echo '(0..728).map{|i|(0..5).map{|j|("%06d"%i.to_s(3)*2)[j,6]}.min}.uniq' | ruby -e 'mate = (0...3**6).map { |i| "%06d" % i.to_s(3).to_i }.map { |s| (0..5).map { |j| s[j..-1] + s[0,j] }.min }.uniq; puts gets.chomp.each_byte.map { |b| mate[b] }.unshift(mate[128])' | |
122222 | |
002021 | |
002201 | |
002121 | |
002121 | |
010102 | |
002211 | |
010111 | |
002022 |
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
rbx-2.0.0pre benchmark/search_bench.rb | |
user system total real | |
1 0.000217 0.000040 0.000257 (110.951148) | |
2 0.000106 0.000050 0.000156 ( 84.890900) | |
4 0.000165 0.000100 0.000265 (434.183999) | |
8 0.000453 0.000276 0.000729 (440.761576) |
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
rbx -v | |
rubinius 2.0.0dev (1.8.7 03ecc4ad yyyy-mm-dd JI) [x86_64-apple-darwin10.7.4] | |
with patch https://gist.github.com/1020720 | |
String#gsub | |
time rbx -e 's = "." * 16_000_000; n = 1; c = s.size / n; (0...n).map { |i| Thread.new { s[c * i, c].gsub(".", "-") }}.map(&:join)' | |
real 0m33.407s | |
user 0m33.437s | |
sys 0m0.074s |
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/vm/builtin/regexp.cpp b/vm/builtin/regexp.cpp | |
index 32031b8..d510f5d 100644 | |
--- a/vm/builtin/regexp.cpp | |
+++ b/vm/builtin/regexp.cpp | |
@@ -264,7 +264,7 @@ namespace rubinius { | |
forced_encoding_ = true; | |
} | |
- thread::Mutex::LockGuard lg(state->shared.onig_lock()); | |
+ // thread::Mutex::LockGuard lg(state->shared.onig_lock()); |
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
rbx -v | |
rubinius 2.0.0dev (1.8.7 03ecc4ad yyyy-mm-dd JI) [x86_64-apple-darwin10.7.4] | |
String#gsub | |
time rbx -e 's = "." * 16_000_000; n = 1; c = s.size / n; (0...n).map { |i| Thread.new { s[c * i, c].gsub(/./, "-") }}.map(&:join)' | |
real 0m32.890s | |
user 0m32.896s | |
sys 0m0.098s |
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
(built from rvm) | |
> rbx-head run multi-slice | |
rubinius 1.2.4dev (1.8.7 25a8922d yyyy-mm-dd JI) [x86_64-apple-darwin10.7.4] | |
user system total real | |
multi-slice: 4.837239 0.008982 4.846221 ( 9.869563) | |
Multi-Threaded: 3.0 MB in 5.12s = 0.6 MB/s @ 18 threads | |
Single-Threaded: 3.0 MB in 4.75s = 0.6 MB/s | |
(built from rvm) | |
> rbx-head-nhydra run multi-slice |
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
Benchmarking with CodeRay 0.9.7: | |
real 0m4.007s | |
user 0m3.933s | |
sys 0m0.068s | |
Benchmarking with latest CodeRay: | |
real 0m2.090s | |
user 0m2.056s |
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
Index: lib/coderay/scanners/ruby/patterns.rb | |
=================================================================== | |
--- lib/coderay/scanners/ruby/patterns.rb (revision 706) | |
+++ lib/coderay/scanners/ruby/patterns.rb (working copy) | |
@@ -33,18 +33,7 @@ | |
add(RESERVED_WORDS, :reserved). | |
add(PREDEFINED_CONSTANTS, :pre_constant) | |
- if /\w/u === '∑' | |
- # MRI 1.8.6, 1.8.7 |
NewerOlder