1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

8 commits

Author SHA1 Message Date
nagachika
6ef46f71c7 merge revision(s) 511b55bcef: [Backport #17215]
Enable arm64 optimizations that exist for power/x86 (#3393)

	* Enable unaligned accesses on arm64

	64-bit Arm platforms support unaligned accesses.

	Running the string benchmarks this change improves performance
	by an average of 1.04x, min .96x, max 1.21x, median 1.01x

	* arm64 enable gc optimizations

	Similar to x86 and powerpc optimizations.

	|       |compare-ruby|built-ruby|
	|:------|-----------:|---------:|
	|hash1  |       0.225|     0.237|
	|       |           -|     1.05x|
	|hash2  |       0.110|     0.110|
	|       |       1.00x|         -|

	* vm_exec.c: improve performance for arm64

	|                               |compare-ruby|built-ruby|
	|:------------------------------|-----------:|---------:|
	|vm_array                       |     26.501M|   27.959M|
	|                               |           -|     1.06x|
	|vm_attr_ivar                   |     21.606M|   31.429M|
	|                               |           -|     1.45x|
	|vm_attr_ivar_set               |     21.178M|   26.113M|
	|                               |           -|     1.23x|
	|vm_backtrace                   |       6.621|     6.668|
	|                               |           -|     1.01x|
	|vm_bigarray                    |     26.205M|   29.958M|
	|                               |           -|     1.14x|
	|vm_bighash                     |    504.155k|  479.306k|
	|                               |       1.05x|         -|
	|vm_block                       |     16.692M|   21.315M|
	|                               |           -|     1.28x|
	|block_handler_type_iseq        |       5.083|     7.004|
	|                               |           -|     1.38x|
	---
	 gc.c                           | 13 +++++++++++++
	 gc.h                           |  2 ++
	 include/ruby/internal/config.h |  2 ++
	 regint.h                       |  2 +-
	 siphash.c                      |  2 +-
	 st.c                           |  2 +-
	 vm_exec.c                      |  8 ++++++++
	 7 files changed, 28 insertions(+), 3 deletions(-)
2021-03-20 14:23:45 +09:00
shyouhei
04c94f95d1 switch SipHash from SipHash24 to SipHash13 variant
SipHash13 is secure enough to be used in hash-tables,
and SipHash's author confirms that.
Rust already considered switch to SipHash13:
  https://github.com/rust-lang/rust/issues/29754#issue-116174313
Jean-Philippe Aumasson confirmation:
  https://github.com/rust-lang/rust/issues/29754#issuecomment-156073946
Merged pull request:
  https://github.com/rust-lang/rust/pull/33940

From: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
Date: Thu, 8 Dec 2016 20:31:29 +0300
Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
Fixes: [Feature #13017]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 06:01:23 +00:00
nobu
63360be4d2 UNALIGNED_WORD_ACCESS on ppc64
* include/ruby/defines.h, siphash.c, st.c (UNALIGNED_WORD_ACCESS):
  add PowerPC64 too, which is capable to access unaligned words.
  patched by Gustavo Frederico Temple Pedrosa in [ruby-core:63937].
  [Feature #10081]
* regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:12 +00:00
nobu
59ed302965 siphash.c: fix missing condition
* siphash.c (sip_hash24): fix for aligned word access little endian
  platforms.  [ruby-core:58658] [Bug #9172]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 04:28:15 +00:00
naruse
29f347af11 * regint.h: fix typo: _M_AMD86 -> _M_AMD64.
* siphash.c: ditto.

* st.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10 21:16:44 +00:00
nobu
496d7cc886 siphash.c: union sip_init_state
* siphash.c (sip_init_state): use union to suppress warnings by gcc
  4.7.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 14:02:31 +00:00
naruse
5bde05f98f Use C90 comment style
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 08:11:44 +00:00
nobu
525cb66467 siphash
* random.c (rb_memhash): use siphash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 07:12:00 +00:00