From 236b5e977818df29cf18005cc1a5a650d40434bd Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 28 Jun 2016 18:42:12 +0000 Subject: * bignum.c (rb_big2ulong): the old logic seems to try to avoid calculating `-(long)(num-1)-1` if `num` is not LONG_MIN. (Note that `-LONG_MIN` may be larger than LONG_MAX) But C compilers can optimize it into single NEG instruction. Therefore those two conditions can be single if-body. * bignum.c (rb_big2long): ditto. * bignum.c (rb_big2ull): ditto. * bignum.c (rb_big2ll): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index a579b53459..4d69391762 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Wed Jun 29 03:34:41 2016 NARUSE, Yui + + * bignum.c (rb_big2ulong): the old logic seems to try to avoid + calculating `-(long)(num-1)-1` if `num` is not LONG_MIN. (Note that + `-LONG_MIN` may be larger than LONG_MAX) But C compilers can + optimize it into single NEG instruction. + Therefore those two conditions can be single if-body. + + * bignum.c (rb_big2long): ditto. + + * bignum.c (rb_big2ull): ditto. + + * bignum.c (rb_big2ll): ditto. + Tue Jun 28 22:55:00 2016 Nobuyoshi Nakada * lib/pstore.rb (PStore::CHECKSUM_ALGO): extract the algorithm for -- cgit v1.2.3