diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-29 09:10:32 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-29 09:10:32 +0000 |
commit | 05b9b42918868a0a355a5cf9ce0d92baf4236328 (patch) | |
tree | 6ed8059cdc4d5ef94f8cc4b73510bdf581be3105 /ChangeLog | |
parent | f9ca636ae772bef04bb7f8ff7f899ad000f6c051 (diff) | |
download | ruby-05b9b42918868a0a355a5cf9ce0d92baf4236328.tar.gz |
* encoding.c (rb_enc_check_str): add for performance.
This function only accept T_STRING (and T_REGEXP).
This patch improves performance of a tiny_segmenter benchmark
(num=2) 2.54sec -> 2.42sec on my machine.
https://github.com/chezou/TinySegmenter.jl/blob/master/benchmark/benchmark.rb
* encoding.c: add ENC_DEBUG and ENC_ASSERT() macros.
* internal.h: add a decl. of rb_enc_check_str().
* string.c (rb_str_plus): use rb_enc_check_str().
* string.c (rb_str_subpat_set): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,20 @@ +Thu Oct 29 18:05:22 2015 Koichi Sasada <ko1@atdot.net> + + * encoding.c (rb_enc_check_str): add for performance. + This function only accept T_STRING (and T_REGEXP). + + This patch improves performance of a tiny_segmenter benchmark + (num=2) 2.54sec -> 2.42sec on my machine. + https://github.com/chezou/TinySegmenter.jl/blob/master/benchmark/benchmark.rb + + * encoding.c: add ENC_DEBUG and ENC_ASSERT() macros. + + * internal.h: add a decl. of rb_enc_check_str(). + + * string.c (rb_str_plus): use rb_enc_check_str(). + + * string.c (rb_str_subpat_set): ditto. + Thu Oct 29 17:16:40 2015 Koichi Sasada <ko1@atdot.net> * internal.h: export rb_wb_(un)protected_newobj_of() |