New patch: sparse_array

11 views
Skip to first unread message

Funny Falcon

unread,
Sep 2, 2012, 9:37:20 AM9/2/12
to theco...@googlegroups.com
I've played with replacing st_table with lighter hash structure for methods table, constants table and instance variable positions.

Patch is in `sparse_array/ruby_1_9_3` branch.

Cause it has one merge conflict with `st_opt/ruby_1_9_3`, I've created premerged branch `st_opt_sparse_array/ruby_1_9_3`

Also, I've change a bit `backport_gc/ruby_1_9_3` to be mergeable with `st_opt/ruby_1_9_3`
(I removed couple of backported fixes in gc.c, but moved them to sparse_array branch. But this fixes are for very rare cases,
and they are still not in plain ruby_1_9_3, so that, I think it is not an issue).

Corresponding issue in ruby trunk https://bugs.ruby-lang.org/issues/6962 .
Silly, but I haven't done patch for trunk yet. I'll try to do it shortly.

With regards,
Sokolov Yura aka funny_falcon.

Jon

unread,
Sep 2, 2012, 2:23:44 PM9/2/12
to theco...@googlegroups.com
> I've played with replacing st_table with lighter hash structure for methods
> table, constants table and instance variable positions.

Interesting...more goodies to explore. I think you must be doing some very interesting things with Ruby in the real world since you've been exploring these optimizations for awhile now :)


> Patch is in `sparse_array/ruby_1_9_3` branch.
>
> Cause it has one merge conflict with `st_opt/ruby_1_9_3`, I've created
> premerged branch `st_opt_sparse_array/ruby_1_9_3`
>
> Also, I've change a bit `backport_gc/ruby_1_9_3` to be mergeable with `st_opt/ruby_1_9_3`
>
> (I removed couple of backported fixes in gc.c, but moved them to
> sparse_array branch. But this fixes are for very rare cases,
> and they are still not in plain ruby_1_9_3, so that, I think it is not an
> issue).
>
> Corresponding issue in ruby trunk https://bugs.ruby-lang.org/issues/6962 .
> Silly, but I haven't done patch for trunk yet. I'll try to do it shortly.

Great, thank you.

Assuming the patch branches all build and test OK on Windows and my Arch 3.5.3 system, I plan to merge the following with `ruby_1_9_3` (and fold into `tcs-ruby_1_9_3`) when ruby-core does the next 1.9.3 patch release:

* ary-queue/ruby_1_9_3
* backport-gc/ruby_1_9_3
* cached-lp/ruby_1_9_3
* sorted-lf/ruby_1_9_3
* st_opt_sparse_array/ruby_1_9_3
* win-file-trunk/ruby_1_9_3

Did I miss any?

Also, I see you've optimized your array-as-queue feature request https://bugs.ruby-lang.org/issues/6638#note-7 but I think `ary-queue/ruby_1_9_3` also needs those updates?

Jon

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums

Jon

unread,
Sep 2, 2012, 2:57:42 PM9/2/12
to theco...@googlegroups.com
> Also, I see you've optimized your array-as-queue feature request https://bugs.ruby-lang.org/issues/6638#note-7 but I think `ary-queue/ruby_1_9_3` also needs those updates?

scratch that...I see the branch was forced...screen scroll blindness :(

Юрий Соколов

unread,
Sep 3, 2012, 12:49:30 AM9/3/12
to theco...@googlegroups.com
2012/9/2 Jon <jon.f...@gmail.com>

Interesting...more goodies to explore. I think you must be doing some very interesting things with Ruby in the real world since you've been exploring these optimizations for awhile now :)

No, I just like to optimize.
My first game on PC were "Need For Speed"... may be it had printed on me :)

Yura
Reply all
Reply to author
Forward
0 new messages