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

ruby-changes:40846

From: normal <ko1@a...>
Date: Tue, 8 Dec 2015 03:50:00 +0900 (JST)
Subject: [ruby-changes:40846] normal:r52925 (trunk): doc/extension.rdoc: warn about kwargs performance in C [ci skip]

normal	2015-12-08 03:49:49 +0900 (Tue, 08 Dec 2015)

  New Revision: 52925

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

  Log:
    doc/extension.rdoc: warn about kwargs performance in C [ci skip]
    
    This existing API seems doomed performance-wise, and writing
    things in Ruby is nicer anyways.  So discourage folks from
    using it.
    
    [Feature #11339]

  Modified files:
    trunk/ChangeLog
    trunk/doc/extension.rdoc
Index: doc/extension.rdoc
===================================================================
--- doc/extension.rdoc	(revision 52924)
+++ doc/extension.rdoc	(revision 52925)
@@ -1412,6 +1412,11 @@ int rb_get_kwargs(VALUE keyword_hash, co https://github.com/ruby/ruby/blob/trunk/doc/extension.rdoc#L1412
   next to optional +values+ as a new Hash, otherwise raises "unknown
   keyword" +ArgumentError+.
 
+  Be warned, handling keyword arguments in the C API is less efficient
+  than handling them in Ruby.  Consider using a Ruby wrapper method
+  around a non-keyword C function.
+  ref: https://bugs.ruby-lang.org/issues/11339
+
 VALUE rb_extract_keywords(VALUE *original_hash)
 
   Extracts pairs whose key is a symbol into a new hash from a hash
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52924)
+++ ChangeLog	(revision 52925)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Dec  8 03:45:47 2015  Eric Wong  <e@8...>
+
+	* doc/extension.rdoc: warn about kwargs performance in C
+	  [Feature #11339] [ci skip]
+
 Tue Dec  8 03:44:51 2015  Koichi Sasada  <ko1@a...>
 
 	* iseq.c (iseq_load): disable peephole optimization option

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

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