The patch looks good to me. HOWEVER, let me -1 this.
Integer#size HAS to be as fast as what is proposed here, without any extra hustle like this. @ko1 (Koichi Sasada) any idea what is preventing it from running smoothly?
INT2FIX(sizeof(long) is a constant expression because INT2FIX is a constant inline function that only does some arithmetic operations. So, I guess you don't need to keep that value in rb_cInteger_fix_size global variable.
The patch looks good to me. HOWEVER, let me -1 this.
Integer#size HAS to be as fast as what is proposed here, without any extra hustle like this. @ko1 (Koichi Sasada) any idea what is preventing it from running smoothly?
The patch looks good to me. HOWEVER, let me -1 this.
Integer#size HAS to be as fast as what is proposed here, without any extra hustle like this. @ko1 (Koichi Sasada) any idea what is preventing it from running smoothly?
what is the "extra hustle"?
The proposed patch is basically Primitive.cexpr! 'int_size(self)'. Why it must be faster than rb_define_method(rb_cInteger, "size", int_size, 0)? They should at least perform identically.