* 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:
parent
f67795869d
commit
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>
|
Wed Feb 21 17:40:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* numeric.c (fix_equal): remove FIX2LONG() to optimize. suggested
|
* numeric.c (fix_equal): remove FIX2LONG() to optimize. suggested
|
||||||
|
@ -2311,9 +2311,8 @@ fix_pow(VALUE x, VALUE y)
|
|||||||
static VALUE
|
static VALUE
|
||||||
fix_equal(VALUE x, VALUE y)
|
fix_equal(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
if (FIXNUM_P(y)) {
|
if (x == y) return Qtrue;
|
||||||
return (x == y)?Qtrue:Qfalse;
|
if (FIXNUM_P(y)) return Qfalse;
|
||||||
}
|
|
||||||
switch (TYPE(y)) {
|
switch (TYPE(y)) {
|
||||||
case T_BIGNUM:
|
case T_BIGNUM:
|
||||||
return rb_big_eq(y, x);
|
return rb_big_eq(y, x);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user