[#82311] [Ruby trunk Bug#13794] Infinite loop of sched_yield — charlie@...
Issue #13794 has been reported by catphish (Charlie Smurthwaite).
4 messages
2017/08/09
[#82518] [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — mame@...
Issue #13618 has been updated by mame (Yusuke Endoh).
5 messages
2017/08/30
[#82552] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wong <normalperson@...>
2017/08/31
mame@ruby-lang.org wrote:
[#82756] Re: [Ruby trunk Feature#13618] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
— Eric Wrong <normalperson@...>
2017/09/12
Eric Wrong <normalperson@yhbt.net> wrote:
[ruby-core:82420] [Ruby trunk Bug#13827] Improve performance of `Base64.urlsafe_encode64`
From:
konstantin@...
Date:
2017-08-18 10:59:57 UTC
List:
ruby-core #82420
Issue #13827 has been reported by Soilent (Konstantin _).
----------------------------------------
Bug #13827: Improve performance of `Base64.urlsafe_encode64`
https://bugs.ruby-lang.org/issues/13827
* Author: Soilent (Konstantin _)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Improve performance of `Base64.urlsafe_encode64` by avoiding unnecessary memory allocations. This may seem insignificant, but for the web service I am working on this patch makes noticeable improvement.
### Benchmark
~~~ ruby
require 'benchmark/ips'
require 'base64'
require 'securerandom'
Benchmark.ips do |x|
string = SecureRandom.bytes(128)
x.report 'Base64.urlsafe_encode64' do |t|
t.times { Base64.urlsafe_encode64(string) }
end
end
~~~
### Before
~~~
Base64.urlsafe_encode64
559.355k (賊 3.2%) i/s - 2.805M in 5.019239s
~~~
### After
~~~
Base64.urlsafe_encode64
736.211k (賊 2.5%) i/s - 3.721M in 5.057606s
~~~
### Patch
https://github.com/ruby/ruby/pull/1676
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>