зеркало из https://github.com/github/ruby.git
* numeric.c (fix_equal): A bit more optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f67795869d
Коммит
4563573a6b
|
@ -1,3 +1,7 @@
|
|||
Wed Feb 21 22:29:45 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* numeric.c (fix_equal): A bit more optimization.
|
||||
|
||||
Wed Feb 21 17:40:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* numeric.c (fix_equal): remove FIX2LONG() to optimize. suggested
|
||||
|
|
|
@ -2311,9 +2311,8 @@ fix_pow(VALUE x, VALUE y)
|
|||
static VALUE
|
||||
fix_equal(VALUE x, VALUE y)
|
||||
{
|
||||
if (FIXNUM_P(y)) {
|
||||
return (x == y)?Qtrue:Qfalse;
|
||||
}
|
||||
if (x == y) return Qtrue;
|
||||
if (FIXNUM_P(y)) return Qfalse;
|
||||
switch (TYPE(y)) {
|
||||
case T_BIGNUM:
|
||||
return rb_big_eq(y, x);
|
||||
|
|
Загрузка…
Ссылка в новой задаче