Project

General

Profile

Feature #11414

Relax ID table ordering

Added by ko1 (Koichi Sasada) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:70237]

Description

Can we relax ordering rule for ID table such as method table, ivar table, and so on?
I believe nobody care about method table ordering, ivar table ordering.

background

From Ruby 1.9, Hash objects have order (insertion order).
This change was introduced by changing st data structure.

In Ruby interpreter, st is also used by many purpose.
For example, there are many tables which have ID keys, for method tables, ivar tables and so on.

We can make special table to optimize such ID keys table.

funny_falcon already proposed new data structure.
https://bugs.ruby-lang.org/issues/6962

Before introducing this patch, please consider about ordering.

BTW, here is my implementation of special ID keys table used by method table.
https://github.com/ruby/ruby/compare/trunk...ko1:mtbl

I will make another ticket for implementation. But please consider about ordering.

We have one test depends on method table ordering.

[ 72/143] TestModule#test_method_added = 0.00 s
  1) Failure:
TestModule#test_method_added [.../test/ruby/test_module.rb:1120]:
<[:f, :g, :a]> expected but was
<[:f, :a, :g]>.

Related issues

Related to Ruby trunk - Feature #11420: Introduce ID key table into MRIClosedActions

Associated revisions

Revision 91f20981
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 51482
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

Revision 51482
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

Revision 51482
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

Revision 51482
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

Revision 51482
Added by ko1 (Koichi Sasada) almost 4 years ago

  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]

History

Updated by matz (Yukihiro Matsumoto) almost 4 years ago

  • Assignee changed from matz (Yukihiro Matsumoto) to ko1 (Koichi Sasada)

Ordering is not included in the specified behavior.

Matz.

#2

Updated by ko1 (Koichi Sasada) almost 4 years ago

  • Status changed from Open to Closed

Applied in changeset r51482.


  • test/ruby/test_module.rb: should not expect a method table ordering. [Feature #11414]
#3

Updated by ko1 (Koichi Sasada) almost 4 years ago

Also available in: Atom PDF