From b3b5e626ad69bf22be3228f847f94e1b68f40888 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 23 Aug 2012 07:22:40 +0000 Subject: * include/ruby/ruby.h: introduce flonum technique for 64bit CPU environment (sizeof(double) == sizeof(VALUE)). flonum technique enables to avoid double object creation if the double value d is in range about between 1.72723e-77 < |d| <= 1.15792e+77 or 0.0. flonum Float value is immediate and their lowest two bits are b10. If flonum is activated, then USE_FLONUM macro is 1. I'll write detailed in this technique on https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech * benchmark/bmx_temp.rb: add an benchmark for simple Float calculation. * gc.c (id2ref, rb_obj_id): add flonum Float support. * include/ruby/intern.h: move decl of rb_float_new(double) to include/ruby/ruby.h. * insns.def, vm.c, vm_insnhelper.c: add flonum optimization and simplify source code. * vm_insnhelper.h (FLONUM_2_P): added. * marshal.c: support flonum output. * numeric.c (rb_float_new_in_heap): added. * parse.y: support flonum. * random.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/ruby/intern.h') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 71f5442a7a..3f03d4dab7 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -516,7 +516,6 @@ NORETURN(void rb_num_zerodiv(void)); VALUE rb_num_coerce_bin(VALUE, VALUE, ID); VALUE rb_num_coerce_cmp(VALUE, VALUE, ID); VALUE rb_num_coerce_relop(VALUE, VALUE, ID); -VALUE rb_float_new(double); VALUE rb_num2fix(VALUE); VALUE rb_fix2str(VALUE, int); VALUE rb_dbl_cmp(double, double); -- cgit v1.2.3