| Age | Commit message (Collapse) | Author |
|
[Backport #21187]
|
|
|
|
|
|
https://github.com/ruby/prism/commit/817a8e39d9
Notes:
Merged: https://github.com/ruby/ruby/pull/12358
|
|
https://github.com/ruby/prism/commit/f80026883d
Notes:
Merged: https://github.com/ruby/ruby/pull/12358
|
|
https://github.com/ruby/prism/commit/230c8b8a48
|
|
https://github.com/ruby/prism/commit/5ea6042408
|
|
https://github.com/ruby/prism/commit/343197e4ff
|
|
* For Loader.java, do not deserialize the AST if there are errors, so then Java nodes only have non-error types for fields.
https://github.com/ruby/prism/commit/ae78e3c605
|
|
reuse in templates
https://github.com/ruby/prism/commit/c20bf05ecc
|
|
https://github.com/ruby/prism/commit/dbb7e0a44e
|
|
|
|
https://github.com/ruby/prism/commit/50d79b734b
|
|
This PR tweaked the documentation to correct an error encountered
when running the example code of `Prism::Dispatcher`.
This aims to make understanding the example smoother.
https://github.com/ruby/prism/commit/165a1a0e78
|
|
https://github.com/ruby/prism/commit/c7a4a90ee8
|
|
https://github.com/ruby/prism/commit/86cf82794a
|
|
https://github.com/ruby/prism/commit/bf16ade7f9
|
|
https://github.com/ruby/prism/commit/08a71f6259
|
|
https://github.com/ruby/prism/commit/1ffb141199
|
|
https://github.com/ruby/prism/commit/d0143865c2
|
|
https://github.com/ruby/prism/commit/9f12a56fd6
|
|
https://github.com/ruby/prism/commit/4cc0eda4ca
|
|
|
|
Having the @newline instance variable in every node adds up, and
since it is so rarely used, we only want to add it when necessary.
Moving this into an autoloaded file and moving the instance variable
out of the default initializers reduces allocated memory because the
nodes are now smaller and some fit into the compact list. On my
machine, I'm seeing about an 8% drop.
https://github.com/ruby/prism/commit/eea92c07d2
|
|
|
|
|
|
https://github.com/ruby/prism/commit/a298db68e3
|
|
https://github.com/ruby/prism/commit/0bf5d651da
|
|
https://github.com/ruby/prism/commit/40993166a8
|
|
https://github.com/ruby/prism/commit/cb4a8ab772
|
|
https://github.com/ruby/prism/commit/c9edeef91a
|
|
https://github.com/ruby/prism/commit/9b61f6fdb3
|
|
We would previously cause a stack overflow if we parsed a file that
was too deeply nested when we were calling inspect. Instead, we now
use a queue of commands to do it linearly so we don't.
https://github.com/ruby/prism/commit/0f21f5bfe1
|
|
https://github.com/ruby/prism/commit/dc121e4fdf
|
|
https://github.com/ruby/prism/commit/0156057580
|
|
https://github.com/ruby/prism/commit/17194e096d
|
|
https://github.com/ruby/prism/commit/eadb09ef36
|
|
https://github.com/ruby/prism/commit/f3f9950a74
|
|
https://github.com/ruby/prism/commit/4da514456f
|
|
https://github.com/ruby/prism/commit/f540e830b5
|
|
If there are many searches in the `$LOAD_PATH` in the user environment,
require will perform unnecessary searches that are not needed.
In contrast, `require_relative` is efficient because it uses a relative path.
https://github.com/ruby/prism/commit/438ccc67bd
|
|
https://github.com/ruby/prism/commit/a735c2262f
|
|
https://github.com/ruby/prism/commit/2a583b041b
|
|
https://github.com/ruby/prism/commit/a01d6a4e32
|
|
https://github.com/ruby/prism/commit/1d87b8c46c
|
|
namespace
https://github.com/ruby/prism/commit/0e4dbcd3e4
|
|
* The stdlib StringIO is synchronized and this occurs a high overhead.
* This is about twice as fast on TruffleRuby but surprisingly it is slower on JRuby.
I am not sure why but probably @ivar access and integer arithmetic
is much slower than Java field access/arithmetic on JRuby.
* On CRuby interpreter it is slower, which is expected as the GVL already protects StringIO.
* So we enable this only on TruffleRuby to not slow down other Rubies.
* PRISM_FFI_BACKEND=true ruby -v -Ilib -rprism -rbenchmark -e '300.times { p Benchmark.realtime { Dir.glob("lib/**/*.rb") { |f| Prism.parse_file(f) } } }'
ruby 3.3.0: 0.215 => 0.251 (cext: 0.062)
ruby 3.3.0 YJIT: 0.118 => 0.113 (cext: 0.053)
truffleruby JVM: 0.101 => 0.054
jruby 9.4.6.0: 0.162 => 0.219
jruby 9.4.6.0 indy: 0.078 => 0.086
* For the record here are the numbers for using the String directly, without a StringIO-like object:
ruby 3.3.0: 0.215 => 0.234 (cext: 0.062)
ruby 3.3.0 YJIT: 0.118 => 0.111 (cext: 0.053)
truffleruby native: 0.101 => 0.053
jruby 9.4.6.0: 0.162 => 0.195
jruby 9.4.6.0 indy: 0.078 => 0.082
As we can see, that extra object adds a non-trivial overhead on CRuby interpreter and JRuby.
But we need to make it possible to use StringIO and SimpleStringIO interchangeably.
https://github.com/ruby/prism/commit/938677cbd2
|
|
Prism::Serialize::Loader#load_location
* Following the changes in #2428.
* PRISM_FFI_BACKEND=true ruby -v -Ilib -rprism -rbenchmark -e '10.times { p Benchmark.realtime { Dir.glob("lib/**/*.rb") { |f| Prism.parse_file(f) } } }'
ruby 3.3.0: 0.255 => 0.210
ruby 3.3.0 YJIT: 0.150 => 0.120
https://github.com/ruby/prism/commit/fabf809bbf
|
|
https://github.com/ruby/prism/commit/4ef4032774
|
|
https://github.com/ruby/prism/commit/f731edcc26
|