ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index
@ 2013-03-24  7:56 funny_falcon (Yura Sokolov)
  2013-03-24 13:47 ` [ruby-core:53691] [ruby-trunk - Feature #8158] " funny_falcon (Yura Sokolov)
                   ` (22 more replies)
  0 siblings, 23 replies; 27+ messages in thread
From: funny_falcon (Yura Sokolov) @ 2013-03-24  7:56 UTC (permalink / raw
  To: ruby-core


Issue #8158 has been reported by funny_falcon (Yura Sokolov).

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158

Author: funny_falcon (Yura Sokolov)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:53691] [ruby-trunk - Feature #8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
@ 2013-03-24 13:47 ` funny_falcon (Yura Sokolov)
  2013-04-05  2:43 ` [ruby-core:54010] " zzak (Zachary Scott)
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny_falcon (Yura Sokolov) @ 2013-03-24 13:47 UTC (permalink / raw
  To: ruby-core


Issue #8158 has been updated by funny_falcon (Yura Sokolov).


Same for ruby_2_0_0 branch

https://github.com/funny-falcon/ruby/compare/ruby_2_0_0...features_index/ruby_2_0_0.diff
https://github.com/funny-falcon/ruby/compare/ruby_2_0_0...features_index/ruby_2_0_0
----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-37877

Author: funny_falcon (Yura Sokolov)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: current: 2.1.0


Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:54010] [ruby-trunk - Feature #8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
  2013-03-24 13:47 ` [ruby-core:53691] [ruby-trunk - Feature #8158] " funny_falcon (Yura Sokolov)
@ 2013-04-05  2:43 ` zzak (Zachary Scott)
  2013-10-01  7:58 ` [ruby-core:57523] [ruby-trunk - Feature #8158][Assigned] " nobu (Nobuyoshi Nakada)
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: zzak (Zachary Scott) @ 2013-04-05  2:43 UTC (permalink / raw
  To: ruby-core


Issue #8158 has been updated by zzak (Zachary Scott).

File 264.patch added
Category set to core


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-38247

Author: funny_falcon (Yura Sokolov)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: current: 2.1.0


Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:57523] [ruby-trunk - Feature #8158][Assigned] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
  2013-03-24 13:47 ` [ruby-core:53691] [ruby-trunk - Feature #8158] " funny_falcon (Yura Sokolov)
  2013-04-05  2:43 ` [ruby-core:54010] " zzak (Zachary Scott)
@ 2013-10-01  7:58 ` nobu (Nobuyoshi Nakada)
  2014-01-30  6:16 ` [ruby-core:60285] [ruby-trunk - Feature #8158] " shibata.hiroshi
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2013-10-01  7:58 UTC (permalink / raw
  To: ruby-core


Issue #8158 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Assigned
Assignee set to nobu (Nobuyoshi Nakada)


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-42137

Author: funny_falcon (Yura Sokolov)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: current: 2.1.0


Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:60285] [ruby-trunk - Feature #8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (2 preceding siblings ...)
  2013-10-01  7:58 ` [ruby-core:57523] [ruby-trunk - Feature #8158][Assigned] " nobu (Nobuyoshi Nakada)
@ 2014-01-30  6:16 ` shibata.hiroshi
  2016-10-07 13:20 ` [ruby-core:77515] [Ruby trunk Feature#8158] " funny.falcon
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: shibata.hiroshi @ 2014-01-30  6:16 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Hiroshi SHIBATA.

Target version changed from 2.1.0 to current: 2.2.0

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-44768

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Category: core
* Target version: current: 2.2.0
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
264.patch (14.9 KB)


-- 
http://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:77515] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (3 preceding siblings ...)
  2014-01-30  6:16 ` [ruby-core:60285] [ruby-trunk - Feature #8158] " shibata.hiroshi
@ 2016-10-07 13:20 ` funny.falcon
  2016-10-07 13:24 ` [ruby-core:77516] " funny.falcon
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-10-07 13:20 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.

File 0001-load.c-reduce-memory-usage-of-loaded_features_index.patch added

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-60778

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
264.patch (14.9 KB)
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.87 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:77516] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (4 preceding siblings ...)
  2016-10-07 13:20 ` [ruby-core:77515] [Ruby trunk Feature#8158] " funny.falcon
@ 2016-10-07 13:24 ` funny.falcon
  2016-12-12  6:06   ` [ruby-core:78595] " Eric Wong
  2016-12-12  7:20 ` [ruby-core:78598] " nobu
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 27+ messages in thread
From: funny.falcon @ 2016-10-07 13:24 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.


I've changed implementation a bit:
Because https://bugs.ruby-lang.org/issues/12142 likely to be accepted,
I've used st_table with numtable instead of separate datastructure.

So patch now is shorter.
https://bugs.ruby-lang.org/attachments/download/6182/0001-load.c-reduce-memory-usage-of-loaded_features_index.patch

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-60779

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
264.patch (14.9 KB)
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.87 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78595] Re: [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2016-10-07 13:24 ` [ruby-core:77516] " funny.falcon
@ 2016-12-12  6:06   ` Eric Wong
  2016-12-12  6:25     ` [ruby-core:78596] " U.NAKAMURA
  0 siblings, 1 reply; 27+ messages in thread
From: Eric Wong @ 2016-12-12  6:06 UTC (permalink / raw
  To: ruby-core

funny.falcon@gmail.com wrote:
> So patch now is shorter.
> https://bugs.ruby-lang.org/attachments/download/6182/0001-load.c-reduce-memory-usage-of-loaded_features_index.patch

Thanks; this got broken by trivial whitespace change in r57032

I'm not sure about the portability of initializing structs
with non-const values for some compilers.  Maybe usa or
somebody with more portability experience can comment.

Also, in C Ruby; initial indent is 4 spaces, second indent is
hard tab.  Not my rule and I hate it; but not much we can do...

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78596] Re: [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2016-12-12  6:06   ` [ruby-core:78595] " Eric Wong
@ 2016-12-12  6:25     ` U.NAKAMURA
  0 siblings, 0 replies; 27+ messages in thread
From: U.NAKAMURA @ 2016-12-12  6:25 UTC (permalink / raw
  To: Ruby developers

Hi,

In message "[ruby-core:78595] Re: [Ruby trunk Feature#8158] lightweight structure for loaded features index"
  on Mon, 12 Dec 2016 06:06:13 +0000, normalperson@yhbt.net wrote:
> I'm not sure about the portability of initializing structs
> with non-const values for some compilers.  Maybe usa or
> somebody with more portability experience can comment.

It's OK, at least for VC++.


Regards,
-- 
U.Nakamaura <usa@garbagecollect.jp>


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78598] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (5 preceding siblings ...)
  2016-10-07 13:24 ` [ruby-core:77516] " funny.falcon
@ 2016-12-12  7:20 ` nobu
  2016-12-12  8:05 ` [ruby-core:78599] " funny.falcon
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: nobu @ 2016-12-12  7:20 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Nobuyoshi Nakada.


Usaku NAKAMURA wrote:
>  In message "[ruby-core:78595] Re: [Ruby trunk Feature#8158] lightweight structure for loaded features index"
>  on Mon, 12 Dec 2016 06:06:13 +0000, normalperson@yhbt.net wrote:
>  > I'm not sure about the portability of initializing structs
>  > with non-const values for some compilers.  Maybe usa or
>  > somebody with more portability experience can comment.
>  
>  It's OK, at least for VC++.

Other compilers fail, IIRC, Solaris, AIX, HP-UX, or something.

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61982

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
264.patch (14.9 KB)
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.87 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78599] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (6 preceding siblings ...)
  2016-12-12  7:20 ` [ruby-core:78598] " nobu
@ 2016-12-12  8:05 ` funny.falcon
  2016-12-12 10:39 ` [ruby-core:78600] " funny.falcon
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12  8:05 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.


I'll fix patch today.

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61983

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
264.patch (14.9 KB)
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.87 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78600] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (7 preceding siblings ...)
  2016-12-12  8:05 ` [ruby-core:78599] " funny.falcon
@ 2016-12-12 10:39 ` funny.falcon
  2016-12-12 10:44 ` [ruby-core:78601] " funny.falcon
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12 10:39 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.

File 0001-load.c-reduce-memory-usage-of-loaded_features_index.patch added

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61986

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78601] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (8 preceding siblings ...)
  2016-12-12 10:39 ` [ruby-core:78600] " funny.falcon
@ 2016-12-12 10:44 ` funny.falcon
  2016-12-12 11:22 ` [ruby-core:78604] " funny.falcon
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12 10:44 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.


I've uploaded fixed patch:
https://bugs.ruby-lang.org/attachments/download/6293/0001-load.c-reduce-memory-usage-of-loaded_features_index.patch

Github branch and diff:
https://github.com/funny-falcon/ruby/tree/loaded_features_strings
https://github.com/ruby/ruby/compare/trunk...funny-falcon:loaded_features_strings.patch

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61987

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78604] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (9 preceding siblings ...)
  2016-12-12 10:44 ` [ruby-core:78601] " funny.falcon
@ 2016-12-12 11:22 ` funny.falcon
  2016-12-12 11:24 ` [ruby-core:78605] " funny.falcon
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12 11:22 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.

File load.c-loaded_features_numindex.patch added

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61989

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78605] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (10 preceding siblings ...)
  2016-12-12 11:22 ` [ruby-core:78604] " funny.falcon
@ 2016-12-12 11:24 ` funny.falcon
  2016-12-12 11:30 ` [ruby-core:78606] " funny.falcon
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12 11:24 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.

File load.c-loaded_features_numindex.patch added

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61991

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78606] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (11 preceding siblings ...)
  2016-12-12 11:24 ` [ruby-core:78605] " funny.falcon
@ 2016-12-12 11:30 ` funny.falcon
  2016-12-21 14:25 ` [ruby-core:78780] " shyouhei
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2016-12-12 11:30 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.


I've tried to simplify patch: remove `struct feature_str` and use just pointer with len.

https://bugs.ruby-lang.org/attachments/download/6295/load.c-loaded_features_numindex.patch

https://github.com/ruby/ruby/compare/trunk...funny-falcon:loaded_features_index.patch
https://github.com/funny-falcon/ruby/tree/loaded_features_index


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-61992

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:78780] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (12 preceding siblings ...)
  2016-12-12 11:30 ` [ruby-core:78606] " funny.falcon
@ 2016-12-21 14:25 ` shyouhei
  2017-01-19  5:48 ` [ruby-core:79133] " matz
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: shyouhei @ 2016-12-21 14:25 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Shyouhei Urabe.


We looked at this issue at today's developer meeting and had positive opinions.  Maybe introduced in 2.5.

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-62182

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:79133] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (13 preceding siblings ...)
  2016-12-21 14:25 ` [ruby-core:78780] " shyouhei
@ 2017-01-19  5:48 ` matz
  2017-01-19 11:11 ` [ruby-core:79164] " funny.falcon
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: matz @ 2017-01-19  5:48 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yukihiro Matsumoto.


The patch seems OK now. @funny_falcon do you want to check in by yourself?

Matz.

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-62547

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:79164] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (14 preceding siblings ...)
  2017-01-19  5:48 ` [ruby-core:79133] " matz
@ 2017-01-19 11:11 ` funny.falcon
  2018-02-13 21:39 ` [ruby-core:85530] " sam.saffron
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2017-01-19 11:11 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by Yura Sokolov.


Matz,

I don't know English enough to clearly understand your suggestion.

Is it suggestion of commit rights?
If it is, it will be a great honor for me.
But I'm not even-tempered person, and I fear I will put a mess into repository if I will have commit rights.

If your suggestion means some-thing else, then may you formulate it in some other words so I can understand?

With regards,
Yura.


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-62582

* Author: Yura Sokolov
* Status: Assigned
* Priority: Normal
* Assignee: Nobuyoshi Nakada
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85530] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (15 preceding siblings ...)
  2017-01-19 11:11 ` [ruby-core:79164] " funny.falcon
@ 2018-02-13 21:39 ` sam.saffron
  2018-02-14 10:53 ` [ruby-core:85543] " funny.falcon
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: sam.saffron @ 2018-02-13 21:39 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by sam.saffron (Sam Saffron).


Hi Yura, 

I think the commit rights here reduce the amount of work for the rest of the Ruby team. 

This change is approved and reviewed, so you can commit it directly once you have the rights, no need to make other people do the committing. 

Very keen to have this change included in Ruby. 

Sam 

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70318

* Author: funny_falcon (Yura Sokolov)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85543] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (16 preceding siblings ...)
  2018-02-13 21:39 ` [ruby-core:85530] " sam.saffron
@ 2018-02-14 10:53 ` funny.falcon
  2018-02-15 19:55   ` [ruby-core:85588] " Eric Wong
  2018-02-14 18:39 ` [ruby-core:85554] [Ruby trunk Feature#8158][Closed] " tenderlove
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 27+ messages in thread
From: funny.falcon @ 2018-02-14 10:53 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by funny_falcon (Yura Sokolov).


Year after I think I am more stable person, so I'm going to accept commit rights with gratitude, honor and great responsibility.

But until I passed procedure, I'd be thankful if @tenderlovemaking will commit this one.

With regards,
Yura.

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70337

* Author: funny_falcon (Yura Sokolov)
* Status: Assigned
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85554] [Ruby trunk Feature#8158][Closed] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (17 preceding siblings ...)
  2018-02-14 10:53 ` [ruby-core:85543] " funny.falcon
@ 2018-02-14 18:39 ` tenderlove
  2018-02-20  6:34 ` [ruby-core:85673] [Ruby trunk Feature#8158] " matz
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: tenderlove @ 2018-02-14 18:39 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by tenderlovemaking (Aaron Patterson).

Status changed from Assigned to Closed

Committed in r62404.  Thanks Yura!!

----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70347

* Author: funny_falcon (Yura Sokolov)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85588] Re: [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2018-02-14 10:53 ` [ruby-core:85543] " funny.falcon
@ 2018-02-15 19:55   ` Eric Wong
  0 siblings, 0 replies; 27+ messages in thread
From: Eric Wong @ 2018-02-15 19:55 UTC (permalink / raw
  To: ruby-core

> https://bugs.ruby-lang.org/issues/8158

I am curious, what is the significance of the 0xfea7009e
initializer passed to st_hash?

Would it be appropriate to use for the `st_hash' call in
hash.c::hash_i as well?

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85673] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (18 preceding siblings ...)
  2018-02-14 18:39 ` [ruby-core:85554] [Ruby trunk Feature#8158][Closed] " tenderlove
@ 2018-02-20  6:34 ` matz
  2018-02-20 10:40 ` [ruby-core:85690] " funny.falcon
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 27+ messages in thread
From: matz @ 2018-02-20  6:34 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by matz (Yukihiro Matsumoto).


@funny_falcon? Will you be a committer?

Matz.


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70465

* Author: funny_falcon (Yura Sokolov)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85690] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (19 preceding siblings ...)
  2018-02-20  6:34 ` [ruby-core:85673] [Ruby trunk Feature#8158] " matz
@ 2018-02-20 10:40 ` funny.falcon
  2018-02-20 10:49 ` [ruby-core:85691] " funny.falcon
  2018-02-23 12:58 ` [ruby-core:85774] " hsbt
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2018-02-20 10:40 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by funny_falcon (Yura Sokolov).


@matz , yes I will.
Excuse me for the delay. I'll try to proceed with steps from CommitterHowto this week.

With regards,
Yura.


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70494

* Author: funny_falcon (Yura Sokolov)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85691] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (20 preceding siblings ...)
  2018-02-20 10:40 ` [ruby-core:85690] " funny.falcon
@ 2018-02-20 10:49 ` funny.falcon
  2018-02-23 12:58 ` [ruby-core:85774] " hsbt
  22 siblings, 0 replies; 27+ messages in thread
From: funny.falcon @ 2018-02-20 10:49 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by funny_falcon (Yura Sokolov).


normalperson (Eric Wong) wrote:

> > https://bugs.ruby-lang.org/issues/8158
>  
>  I am curious, what is the significance of the 0xfea7009e
>  initializer passed to st_hash?

0xfea7009e - is a "feature" hex-spelled :-) Nothing special.
It could be ommitted, given features are strings without zero bytes.
I put it here just for fun.

>  Would it be appropriate to use for the `st_hash' call in
>  hash.c::hash_i as well?

I believe, there's no real needs.

>  Thanks.

With regards,
Yura.


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70495

* Author: funny_falcon (Yura Sokolov)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [ruby-core:85774] [Ruby trunk Feature#8158] lightweight structure for loaded features index
  2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
                   ` (21 preceding siblings ...)
  2018-02-20 10:49 ` [ruby-core:85691] " funny.falcon
@ 2018-02-23 12:58 ` hsbt
  22 siblings, 0 replies; 27+ messages in thread
From: hsbt @ 2018-02-23 12:58 UTC (permalink / raw
  To: ruby-core

Issue #8158 has been updated by hsbt (Hiroshi SHIBATA).


Hi all.

I did create an account of funny_falcon on svn.ruby-lang.org.


----------------------------------------
Feature #8158: lightweight structure for loaded features index
https://bugs.ruby-lang.org/issues/8158#change-70621

* Author: funny_falcon (Yura Sokolov)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 
----------------------------------------
Use lightweight structure for loaded_features index:

- use hand made simple hash structure, which uses only one memory chunk,
- do not store feature name string, only hash of it, since loaded_feature_path
  will recheck feature name on hash collision
- use single linked lists instead of arrays for storing features indices.
- store this lists inside one array, using array's indices as a reference.

While startup speedup improvement is relatively small compared current implementation,
this one does not need any Ruby Objects at all, so that there is no presure on GC.

https://github.com/ruby/ruby/pull/264.patch
https://github.com/ruby/ruby/pull/264.diff
https://github.com/ruby/ruby/pull/264

---Files--------------------------------
0001-load.c-reduce-memory-usage-of-loaded_features_index.patch (5.99 KB)
load.c-loaded_features_numindex.patch (4.99 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2018-02-23 12:58 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-24  7:56 [ruby-core:53688] [ruby-trunk - Feature #8158][Open] lightweight structure for loaded features index funny_falcon (Yura Sokolov)
2013-03-24 13:47 ` [ruby-core:53691] [ruby-trunk - Feature #8158] " funny_falcon (Yura Sokolov)
2013-04-05  2:43 ` [ruby-core:54010] " zzak (Zachary Scott)
2013-10-01  7:58 ` [ruby-core:57523] [ruby-trunk - Feature #8158][Assigned] " nobu (Nobuyoshi Nakada)
2014-01-30  6:16 ` [ruby-core:60285] [ruby-trunk - Feature #8158] " shibata.hiroshi
2016-10-07 13:20 ` [ruby-core:77515] [Ruby trunk Feature#8158] " funny.falcon
2016-10-07 13:24 ` [ruby-core:77516] " funny.falcon
2016-12-12  6:06   ` [ruby-core:78595] " Eric Wong
2016-12-12  6:25     ` [ruby-core:78596] " U.NAKAMURA
2016-12-12  7:20 ` [ruby-core:78598] " nobu
2016-12-12  8:05 ` [ruby-core:78599] " funny.falcon
2016-12-12 10:39 ` [ruby-core:78600] " funny.falcon
2016-12-12 10:44 ` [ruby-core:78601] " funny.falcon
2016-12-12 11:22 ` [ruby-core:78604] " funny.falcon
2016-12-12 11:24 ` [ruby-core:78605] " funny.falcon
2016-12-12 11:30 ` [ruby-core:78606] " funny.falcon
2016-12-21 14:25 ` [ruby-core:78780] " shyouhei
2017-01-19  5:48 ` [ruby-core:79133] " matz
2017-01-19 11:11 ` [ruby-core:79164] " funny.falcon
2018-02-13 21:39 ` [ruby-core:85530] " sam.saffron
2018-02-14 10:53 ` [ruby-core:85543] " funny.falcon
2018-02-15 19:55   ` [ruby-core:85588] " Eric Wong
2018-02-14 18:39 ` [ruby-core:85554] [Ruby trunk Feature#8158][Closed] " tenderlove
2018-02-20  6:34 ` [ruby-core:85673] [Ruby trunk Feature#8158] " matz
2018-02-20 10:40 ` [ruby-core:85690] " funny.falcon
2018-02-20 10:49 ` [ruby-core:85691] " funny.falcon
2018-02-23 12:58 ` [ruby-core:85774] " hsbt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).