[#59462] [ruby-trunk - Bug #9342][Open] [PATCH] SizedQueue#clear does not notify waiting threads in Ruby 1.9.3 — "jsc (Justin Collins)" <redmine@...>

9 messages 2014/01/02

[#59466] [ruby-trunk - Bug #9343][Open] [PATCH] SizedQueue#max= wakes up waiters properly — "normalperson (Eric Wong)" <normalperson@...>

11 messages 2014/01/02

[#59498] [ruby-trunk - Bug #9352][Open] [BUG] rb_sys_fail_str(connect(2) for [fe80::1%lo0]:3000) - errno == 0 — "kain (Claudio Poli)" <claudio@...>

10 messages 2014/01/03

[#59516] [ruby-trunk - Bug #9356][Open] TCPSocket.new does not seem to handle INTR — "charliesome (Charlie Somerville)" <charliesome@...>

48 messages 2014/01/03

[#59538] [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — "shyouhei (Shyouhei Urabe)" <shyouhei@...>

33 messages 2014/01/03
[#59582] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — SASADA Koichi <ko1@...> 2014/01/06

Intersting challenge.

[#59541] Re: [ruby-trunk - Feature #9362][Assigned] Minimize cache misshit to gain optimal speed — Eric Wong <normalperson@...> 2014/01/04

Hi, I noticed a trivial typo in array.c, and it fails building struct.c

[#59583] [ruby-trunk - Bug #9367][Open] REXML::XmlDecl doesn't use user specified quotes — "bearmini (Takashi Oguma)" <bear.mini@...>

12 messages 2014/01/06

[#59642] [ruby-trunk - Bug #9384][Open] Segfault in ruby 2.1.0p0 — "cbliard (Christophe Bliard)" <christophe.bliard@...>

11 messages 2014/01/08

[#59791] About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...>

A while ago I created a proof-of-concept that I intended to use in my

16 messages 2014/01/15
[#59794] Re: About unmarshallable DRb objects life-time — Eric Hodel <drbrain@...7.net> 2014/01/15

On 15 Jan 2014, at 11:58, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> wrote:

[#59808] Re: About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2014/01/16

Em 15-01-2014 19:42, Eric Hodel escreveu:

[#59810] Re: About unmarshallable DRb objects life-time — Eric Hodel <drbrain@...7.net> 2014/01/16

On 16 Jan 2014, at 02:15, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> wrote:

[#59826] Re: About unmarshallable DRb objects life-time — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2014/01/17

Em 16-01-2014 19:43, Eric Hodel escreveu:

[#59832] Re: About unmarshallable DRb objects life-time — Eric Hodel <drbrain@...7.net> 2014/01/17

On 17 Jan 2014, at 04:22, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> wrote:

[ruby-core:59486] [ruby-trunk - Feature #8998] string keys for hash literals should use fstrings

From: "headius (Charles Nutter)" <headius@...>
Date: 2014-01-02 23:44:10 UTC
List: ruby-core #59486
Issue #8998 has been updated by headius (Charles Nutter).


I've implemented something like this for JRuby 9k. Both the interpreter and the compiler pre-freeze and dedup the keys, allowing them to go straight into literal hashes.

Performance is significantly improved by doing this:

Before:

$ jruby -rbenchmark -e "10.times { puts Benchmark.measure { hash = nil; 10_000_000.times { hash = { 'a' => 1, 'b' => 1, 'c' => 1, 'd' => 1, 'e' => 1 } } } }"
  5.810000   0.100000   5.910000 (  5.282000)
  5.230000   0.030000   5.260000 (  5.101000)
  4.710000   0.020000   4.730000 (  4.509000)
  4.500000   0.030000   4.530000 (  4.375000)
  4.630000   0.030000   4.660000 (  4.516000)
  4.510000   0.020000   4.530000 (  4.390000)
  4.560000   0.030000   4.590000 (  4.433000)
  4.580000   0.030000   4.610000 (  4.455000)
  4.540000   0.020000   4.560000 (  4.416000)
  4.560000   0.030000   4.590000 (  4.435000)

After:

$ jruby -rbenchmark -e "10.times { puts Benchmark.measure { hash = nil; 10_000_000.times { hash = { 'a' => 1, 'b' => 1, 'c' => 1, 'd' => 1, 'e' => 1 } } } }"
  3.270000   0.100000   3.370000 (  2.295000)
  2.140000   0.020000   2.160000 (  2.069000)
  1.870000   0.010000   1.880000 (  1.779000)
  1.930000   0.020000   1.950000 (  1.744000)
  1.790000   0.010000   1.800000 (  1.734000)
  1.810000   0.010000   1.820000 (  1.750000)
  1.790000   0.010000   1.800000 (  1.743000)
  1.820000   0.020000   1.840000 (  1.769000)
  1.820000   0.010000   1.830000 (  1.766000)
  1.770000   0.010000   1.780000 (  1.712000)

For reference, 2.1p0 on my system:

$ rvm ruby-2.1 do ruby -rbenchmark -e "10.times { puts Benchmark.measure { hash = nil; 10_000_000.times { hash = { 'a' => 1, 'b' => 1, 'c' => 1, 'd' => 1, 'e' => 1 } } } }"
  9.060000   0.040000   9.100000 (  9.098937)
  9.030000   0.030000   9.060000 (  9.064616)
  8.980000   0.020000   9.000000 (  9.007513)
  9.050000   0.030000   9.080000 (  9.078869)
  9.250000   0.040000   9.290000 (  9.292398)
  9.020000   0.030000   9.050000 (  9.053593)
  9.080000   0.030000   9.110000 (  9.113024)
  8.970000   0.020000   8.990000 (  8.986615)
  8.870000   0.010000   8.880000 (  8.884534)
  8.940000   0.010000   8.950000 (  8.954753)

When I have the commit done (needs a little cleanup...only a couple hours work at the moment) I will link here in case it is useful.
----------------------------------------
Feature #8998: string keys for hash literals should use fstrings
https://bugs.ruby-lang.org/issues/8998#change-44033

Author: normalperson (Eric Wong)
Status: Closed
Priority: Low
Assignee: 
Category: core
Target version: 2.1.0


While we're introducing optimizations from frozen strings,
string keys inside hashes should be frozen at the compiler level
to prevent duplication.

	a = { "ABC" => :t }
	b = { "ABC" => :t }

	# the following ought to print true
	p(a.keys[0].object_id == b.keys[0].object_id)

This should introduce no incompatibilities and be transparent to users of
older rubies.



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

In This Thread