ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods
@ 2013-06-28 14:22 charliesome (Charlie Somerville)
  2013-06-28 15:09 ` [ruby-core:55688] [ruby-trunk - Bug #8576] " charliesome (Charlie Somerville)
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: charliesome (Charlie Somerville) @ 2013-06-28 14:22 UTC (permalink / raw
  To: ruby-core


Issue #8576 has been reported by charliesome (Charlie Somerville).

----------------------------------------
Bug #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.1.0dev (2013-06-28 trunk 41688) [x86_64-darwin11.4.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods


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

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

* [ruby-core:55688] [ruby-trunk - Bug #8576] Add optimized method type for constant value methods
  2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
@ 2013-06-28 15:09 ` charliesome (Charlie Somerville)
  2013-08-09 10:28 ` [ruby-core:56475] [ruby-trunk - Feature " ko1 (Koichi Sasada)
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: charliesome (Charlie Somerville) @ 2013-06-28 15:09 UTC (permalink / raw
  To: ruby-core


Issue #8576 has been updated by charliesome (Charlie Somerville).

Assignee set to ko1 (Koichi Sasada)

Feedback would be appreciated!
----------------------------------------
Bug #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576#change-40189

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: 
Target version: 
ruby -v: ruby 2.1.0dev (2013-06-28 trunk 41688) [x86_64-darwin11.4.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods


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

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

* [ruby-core:56475] [ruby-trunk - Feature #8576] Add optimized method type for constant value methods
  2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
  2013-06-28 15:09 ` [ruby-core:55688] [ruby-trunk - Bug #8576] " charliesome (Charlie Somerville)
@ 2013-08-09 10:28 ` ko1 (Koichi Sasada)
  2013-09-30 11:25 ` [ruby-core:57485] " ko1 (Koichi Sasada)
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ko1 (Koichi Sasada) @ 2013-08-09 10:28 UTC (permalink / raw
  To: ruby-core


Issue #8576 has been updated by ko1 (Koichi Sasada).


Memo - Discussion on twitter:
https://twitter.com/charliesome/status/350901225010638850

----------------------------------------
Feature #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576#change-41022

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: 
Target version: 


I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods


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

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

* [ruby-core:57485] [ruby-trunk - Feature #8576] Add optimized method type for constant value methods
  2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
  2013-06-28 15:09 ` [ruby-core:55688] [ruby-trunk - Bug #8576] " charliesome (Charlie Somerville)
  2013-08-09 10:28 ` [ruby-core:56475] [ruby-trunk - Feature " ko1 (Koichi Sasada)
@ 2013-09-30 11:25 ` ko1 (Koichi Sasada)
  2013-12-11  5:11 ` [ruby-core:59043] " ko1 (Koichi Sasada)
  2017-02-06  3:19 ` [ruby-core:79447] [Ruby trunk Feature#8576] " ko1
  4 siblings, 0 replies; 6+ messages in thread
From: ko1 (Koichi Sasada) @ 2013-09-30 11:25 UTC (permalink / raw
  To: ruby-core


Issue #8576 has been updated by ko1 (Koichi Sasada).

Category set to core
Target version set to current: 2.1.0


----------------------------------------
Feature #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576#change-42098

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0


I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods


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

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

* [ruby-core:59043] [ruby-trunk - Feature #8576] Add optimized method type for constant value methods
  2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
                   ` (2 preceding siblings ...)
  2013-09-30 11:25 ` [ruby-core:57485] " ko1 (Koichi Sasada)
@ 2013-12-11  5:11 ` ko1 (Koichi Sasada)
  2017-02-06  3:19 ` [ruby-core:79447] [Ruby trunk Feature#8576] " ko1
  4 siblings, 0 replies; 6+ messages in thread
From: ko1 (Koichi Sasada) @ 2013-12-11  5:11 UTC (permalink / raw
  To: ruby-core


Issue #8576 has been updated by ko1 (Koichi Sasada).

Target version changed from current: 2.1.0 to next minor


----------------------------------------
Feature #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576#change-43599

Author: charliesome (Charlie Somerville)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods


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

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

* [ruby-core:79447] [Ruby trunk Feature#8576] Add optimized method type for constant value methods
  2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
                   ` (3 preceding siblings ...)
  2013-12-11  5:11 ` [ruby-core:59043] " ko1 (Koichi Sasada)
@ 2017-02-06  3:19 ` ko1
  4 siblings, 0 replies; 6+ messages in thread
From: ko1 @ 2017-02-06  3:19 UTC (permalink / raw
  To: ruby-core

Issue #8576 has been updated by Koichi Sasada.


Actually, I tried this approach, but I couldn't find good improvement. I'll try it again.

----------------------------------------
Feature #8576: Add optimized method type for constant value methods
https://bugs.ruby-lang.org/issues/8576#change-62879

* Author: Charlie Somerville
* Status: Open
* Priority: Normal
* Assignee: Koichi Sasada
* Target version: next minor
----------------------------------------
I've written a patch adding a new method type (VM_METHOD_TYPE_CONSTVAL) for methods that only return a constant value. The patch significantly improves the performance of calls to these types of methods.

I've written a small benchmark script:

    require "benchmark"
    
    def foo
      1234
    end
    
    puts Benchmark.measure {
      1_000_000.times do
        foo; foo; foo; foo; foo
        foo; foo; foo; foo; foo
      end
    }

Before patch:

    $ ./rb x.rb
      0.620000   0.000000   0.620000 (  0.625130)

After patch:

    $ ./rb x.rb
      0.300000   0.000000   0.300000 (  0.296528)

The patch is here: https://github.com/charliesome/ruby/compare/constant-value-methods



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

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

end of thread, other threads:[~2017-02-06  2:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28 14:22 [ruby-core:55687] [ruby-trunk - Bug #8576][Open] Add optimized method type for constant value methods charliesome (Charlie Somerville)
2013-06-28 15:09 ` [ruby-core:55688] [ruby-trunk - Bug #8576] " charliesome (Charlie Somerville)
2013-08-09 10:28 ` [ruby-core:56475] [ruby-trunk - Feature " ko1 (Koichi Sasada)
2013-09-30 11:25 ` [ruby-core:57485] " ko1 (Koichi Sasada)
2013-12-11  5:11 ` [ruby-core:59043] " ko1 (Koichi Sasada)
2017-02-06  3:19 ` [ruby-core:79447] [Ruby trunk Feature#8576] " ko1

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).