[前][次][番号順一覧][スレッド一覧]

ruby-changes:31748

From: akr <ko1@a...>
Date: Sun, 24 Nov 2013 13:51:40 +0900 (JST)
Subject: [ruby-changes:31748] akr:r43827 (trunk): * include/ruby/defines.h: Don't use int128_t for Bignum.

akr	2013-11-24 13:51:33 +0900 (Sun, 24 Nov 2013)

  New Revision: 43827

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43827

  Log:
    * include/ruby/defines.h: Don't use int128_t for Bignum.
      It's not always faster.
    
    * bignum.c: Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
    trunk/include/ruby/defines.h
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 43826)
+++ include/ruby/defines.h	(revision 43827)
@@ -144,13 +144,7 @@ void xfree(void*); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L144
 #endif
 
 #ifndef BDIGIT
-# if defined(HAVE_INT64_T) && defined(HAVE_INT128_T)
-#  define BDIGIT uint64_t
-#  define SIZEOF_BDIGITS SIZEOF_INT64_T
-#  define BDIGIT_DBL uint128_t
-#  define BDIGIT_DBL_SIGNED int128_t
-#  define PRI_BDIGIT_PREFIX PRI_64_PREFIX
-# elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG
+# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
 #  define BDIGIT unsigned int
 #  define SIZEOF_BDIGITS SIZEOF_INT
 #  define BDIGIT_DBL unsigned LONG_LONG
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43826)
+++ ChangeLog	(revision 43827)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Nov 24 13:49:08 2013  Tanaka Akira  <akr@f...>
+
+	* include/ruby/defines.h: Don't use int128_t for Bignum.
+	  It's not always faster.
+
+	* bignum.c: Ditto.
+
 Sun Nov 24 10:18:15 2013  Aman Gupta <ruby@t...>
 
 	* NEWS: Add details about new debugging features and APIs.
Index: bignum.c
===================================================================
--- bignum.c	(revision 43826)
+++ bignum.c	(revision 43827)
@@ -36,9 +36,7 @@ VALUE rb_cBignum; https://github.com/ruby/ruby/blob/trunk/bignum.c#L36
 const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
 
 #ifndef SIZEOF_BDIGIT_DBL
-# if defined(HAVE_INT64_T) && defined(HAVE_INT128_T)
-#  define SIZEOF_BDIGIT_DBL SIZEOF_INT128_T
-# elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG
+# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG
 #  define SIZEOF_BDIGIT_DBL SIZEOF_LONG_LONG
 # else
 #  define SIZEOF_BDIGIT_DBL SIZEOF_LONG

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]