| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arrange operands of several opt_something insns so that jumps to
opt_send_without_block can be applied to them. This makes it
possible to eliminate CALL_SIMPLE_METHOD macro at all. Results
in binary size of vm_exec_core to change from 27,008 bytes to
26,016 bytes on my machine. [close GH-1779]
Note however that PC can point somewhere non-instruction now.
-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name before after
so_ackermann 0.450 0.426
so_array 0.789 0.824
so_binary_trees 5.760 5.635
so_concatenate 3.594 3.508
so_count_words 0.211 0.196
so_exception 0.256 0.244
so_fannkuch 1.049 1.044
so_fasta 1.485 1.472
so_k_nucleotide 1.195 1.216
so_lists 0.517 0.513
so_mandelbrot 2.264 2.394
so_matrix 0.501 0.468
so_meteor_contest 2.987 2.912
so_nbody 1.307 1.289
so_nested_loop 0.908 0.925
so_nsieve 1.679 1.614
so_nsieve_bits 2.131 2.092
so_object 0.620 0.625
so_partial_sums 1.623 1.675
so_pidigits 1.135 1.190
so_random 0.357 0.321
so_reverse_complement 0.619 0.583
so_sieve 0.493 0.496
so_spectralnorm 1.749 1.737
Speedup ratio: compare with the result of `before' (greater is better)
name after
so_ackermann 1.057
so_array 0.958
so_binary_trees 1.022
so_concatenate 1.024
so_count_words 1.077
so_exception 1.049
so_fannkuch 1.004
so_fasta 1.009
so_k_nucleotide 0.983
so_lists 1.007
so_mandelbrot 0.946
so_matrix 1.072
so_meteor_contest 1.026
so_nbody 1.013
so_nested_loop 0.982
so_nsieve 1.040
so_nsieve_bits 1.018
so_object 0.992
so_partial_sums 0.969
so_pidigits 0.954
so_random 1.111
so_reverse_complement 1.062
so_sieve 0.994
so_spectralnorm 1.007
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that DISPATCH_ORIGINAL_INSN is introduced, we can replace
CALL_SIMPLE_METHOD with DISPATCH_ORIGINAL_INSN. These two macros
differ in size very much and results in this big difference in
compiled binary size. This changeset reduces the size of
vm_exec_core from 32,352 bytes to 27,008 bytes on my machine. As
a result it yields slightly better performance.
Closes [GH-1779].
-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name before after
so_ackermann 0.484 0.454
so_array 0.837 0.779
so_binary_trees 5.928 5.801
so_concatenate 3.473 3.543
so_count_words 0.201 0.222
so_exception 0.255 0.252
so_fannkuch 1.080 1.019
so_fasta 1.459 1.463
so_k_nucleotide 1.218 1.180
so_lists 0.499 0.484
so_mandelbrot 2.189 2.324
so_matrix 0.510 0.496
so_meteor_contest 3.025 2.925
so_nbody 1.319 1.273
so_nested_loop 0.941 0.932
so_nsieve 1.806 1.647
so_nsieve_bits 2.151 2.078
so_object 0.632 0.621
so_partial_sums 1.560 1.632
so_pidigits 1.190 1.183
so_random 0.333 0.353
so_reverse_complement 0.604 0.586
so_sieve 0.521 0.481
so_spectralnorm 1.774 1.722
Speedup ratio: compare with the result of `before' (greater is better)
name after
so_ackermann 1.065
so_array 1.075
so_binary_trees 1.022
so_concatenate 0.980
so_count_words 0.903
so_exception 1.009
so_fannkuch 1.059
so_fasta 0.997
so_k_nucleotide 1.032
so_lists 1.032
so_mandelbrot 0.942
so_matrix 1.028
so_meteor_contest 1.034
so_nbody 1.036
so_nested_loop 1.009
so_nsieve 1.097
so_nsieve_bits 1.035
so_object 1.018
so_partial_sums 0.956
so_pidigits 1.006
so_random 0.943
so_reverse_complement 1.032
so_sieve 1.083
so_spectralnorm 1.030
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that sp_inc attributes are officially provided as inline
functions. Why not use them directly from the vm core, not just
by the compiler. By doing so, it is now possible for us to
optimize stack manipulations. We can now know exactly how many
words of stack space an instruction consumes before it actually
does. This changeset deletes some lines from insns.def because
they are no longer needed. As a result it reduces the size of
vm_exec_core function from 32,400 bytes to 32,352 bytes on my
machine.
It seems it does not affect performance:
-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name before after
loop_for 1.093 1.061
loop_generator 1.156 1.152
loop_times 0.982 0.974
loop_whileloop 0.549 0.587
loop_whileloop2 0.115 0.121
Speedup ratio: compare with the result of `before' (greater is better)
name after
loop_for 1.030
loop_generator 1.003
loop_times 1.008
loop_whileloop 0.935
loop_whileloop2 0.949
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* ruby.c (ruby_init_loadpath_safe): removed code using fixed size
path buffer. relative load path is supported only on platforms
where dladdr is available, or on Windows, so !VARIABLE_LIBPATH
code is not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
Instead of using magic numbers, let us define a series of attributes
and use them from the VM core. Proper function declarations makes
these attributes inlined in most modern compilers. On my machine
exact same binary is generated with or without this changeset.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
We need a longer document to inform users of caveats
related to Signal.trap usage. This is still incomplete,
and we can fill in and edit other bits as needed.
* doc/signals.rdoc: new document
[ruby-core:85107] [Misc #14222]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Sam Saffron for this patch, it shows
a nice reduction which affects many web applications:
require 'memory_profiler'
MemoryProfiler.report do
require 'uri'
end.pretty_print
Before:
Total allocated: 986643 bytes (15159 objects)
Total retained: 246370 bytes (2532 objects)
After:
Total allocated: 926903 bytes (13665 objects)
Total retained: 208570 bytes (1587 objects)
* lib/uri/common.rb: reduce allocations and retained objects
[ruby-core:85161] [Feature #14410]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* method.h (rb_method_definition_struct): use BITFIELD for
rb_method_type_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
I plan to use this macro to pack other enums in the VM.
* internal.h: add BITFIELD macro
* method.h: use BITFIELD for rb_method_visibility_t
[ruby-core:85074] [Misc #14395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We treat this as "int" through the vm_living_thread_num API
anyways, and "pid_t" is still 32-bits with glibc on 64-bit
platforms. I expect it'll be a long time before anybody needs
more than 2 billion native threads. For now, let's save one
cacheline on x86-64 (as reported by pahole(1)):
before: size: 1288, cachelines: 21, members: 45
after: size: 1280, cachelines: 20, members: 45
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
which are changed at r62051.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* compile.c (compile_for_masgn): try to convert to an Array if an
element of massign `for` is not an Array.
[ruby-core:84931] [Bug #14374]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* array.c (rb_check_to_array): conversion to array by to_a method.
returns nil if not possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* variable.c (rb_const_defined_0): toplevel constant lookup has
been removed, should return nil too.
[ruby-core:85142] [Bug #14407] [Fix GH-1800]
From: Gonzalo <grzuy0@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* vm_insnhelper.c (vm_expandarray): get rid of creating
intermediate Array object when conversion failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
as it's helpful for debugging.
I'm not sure what's the good output for RubyVM::TraceInstructions, so I
left it as it is.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
And remove redundant `HAVE_*` macros,
and use `USE_RB_*` macros instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
which is only used by #router.
To make it private, we need to stop defining them on top-level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
via current directory. It's kind of a global state and fragile to
implementation changes in other places, and how the `Dir.getwd` is set
is not obvious from just reading around `RubyVM::Dumper#initialize` if
it depends on the global state.
tool/ruby_vm/controllers/application_controller.rb: explicitly pass
destdir to RubyVM::Dumper.
tool/ruby_vm/scripts/insns2vm.rb: explicitly pass destdir parsed from
optparse.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
Other places are using RT_VER. So I guess this is correct.
Currently AppVeyor CI is failing and I want to fix that.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* include/ruby/missing.h (nan): need to declare the prototype of nan() if
missing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
svn to git bridge on ci.ruby-lang.org sometimes stalls when
dcommitting some commits at once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* error.c (name_err_initialize_options): NameError#initialize
accepts receiver. [Feature #14313]
* error.c (nometh_err_initialize_options): pass keyword arguments
to the super method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* test/ruby/test_exception.rb: added tests for NameError.new, and
NoMethodError.new including priv argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* error.c (nometh_err_initialize): [RDOC] added missing optional
argument priv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* error.c (rb_key_err_new): pass arguments all arguments to the
super method, except for keyword arguments copied to instance
variables. [Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* error.c (key_err_initialize): leave attributes for missing
keyword arguments unset, so accessors can tell if it is missing
or explicit nil. [Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
ADD_PCs moved. That didn't change vast majority of event hooks
because vm_traece() has been placed before ADD_PC. However for GC
events the situation is different. We have to take care.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces new attribute handles_flame and if that is
_not_ the case, places ADD_PC right after INC_SP. This improves
locality of PC manipulations to prevents unnecessary register spill-
outs. As a result, it reduces the size of vm_exec_core from 32,688
bytes to 32,384 bytes on my machine.
Speedup is very faint, but certain.
-----------------------------------------------------------
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name before after
so_ackermann 0.476 0.464
so_array 0.742 0.728
so_binary_trees 5.493 5.466
so_concatenate 3.619 3.395
so_count_words 0.190 0.184
so_exception 0.249 0.239
so_fannkuch 0.994 0.953
so_fasta 1.369 1.374
so_k_nucleotide 1.111 1.111
so_lists 0.470 0.481
so_mandelbrot 2.059 2.050
so_matrix 0.466 0.465
so_meteor_contest 2.712 2.781
so_nbody 1.154 1.204
so_nested_loop 0.852 0.846
so_nsieve 1.636 1.623
so_nsieve_bits 2.073 2.039
so_object 0.616 0.584
so_partial_sums 1.464 1.481
so_pidigits 1.075 1.082
so_random 0.321 0.317
so_reverse_complement 0.555 0.558
so_sieve 0.495 0.490
so_spectralnorm 1.634 1.627
Speedup ratio: compare with the result of `before' (greater is better)
name after
so_ackermann 1.025
so_array 1.019
so_binary_trees 1.005
so_concatenate 1.066
so_count_words 1.030
so_exception 1.040
so_fannkuch 1.043
so_fasta 0.996
so_k_nucleotide 1.000
so_lists 0.978
so_mandelbrot 1.004
so_matrix 1.001
so_meteor_contest 0.975
so_nbody 0.959
so_nested_loop 1.007
so_nsieve 1.008
so_nsieve_bits 1.017
so_object 1.056
so_partial_sums 0.989
so_pidigits 0.994
so_random 1.014
so_reverse_complement 0.996
so_sieve 1.010
so_spectralnorm 1.004
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[Feature #14313][ruby-core:84626]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
Revert r61209, r61210
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
[Bug #14380] [ruby-core:84951]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* hash.c (rb_hash_transform_keys_bang): support key swapping in
Hash#transform_keys!
[Bug #14380] [ruby-core:84951]
* test/ruby/test_hash.rb (test_transform_keys_bang):
add assertions for this change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* compile.c (iseq_peephole_optimize): check that method ID is +@.
fix up r62039.
http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* string.c (str_substr): substring of broken code range string may
be valid or broken. patch by tommy (Masahiro Tomita) at
[ruby-dev:50430] [Bug #14388].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|