| Age | Commit message (Collapse) | Author |
|
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
|
|
$CHECK_FIELD_KIND
https://github.com/ruby/prism/commit/33e987ba3c
|
|
https://github.com/ruby/prism/commit/7905bdbf83
|
|
https://github.com/ruby/prism/commit/9f00fe7510
|
|
https://github.com/ruby/prism/commit/5fda7a0760
|
|
https://github.com/ruby/prism/commit/0209d093ec
|
|
https://github.com/ruby/prism/commit/eabed9f4fd
|
|
https://github.com/ruby/prism/commit/9137226a52
|
|
https://github.com/ruby/prism/commit/120d8c0479
|
|
https://github.com/ruby/prism/commit/4510e2746d
|
|
* Before it could result in NoMethodError if multiple threads were
calling location methods: https://gist.github.com/eregon/b78b7f266d7ee0a278a389cfd1782232
https://github.com/ruby/prism/commit/ff762dcccd
|
|
|
|
When creating the Ruby AST, we were previously allocating Location
objects for every node and every inner location. Instead, this
commit changes it to pack both the start offset and length into a
single u64 and pass that into the nodes. Then, when the locations
are requested via a reader method, we lazily allocate the Location
objects.
https://github.com/ruby/prism/commit/de203dca83
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
* It is quite a bit faster:
ruby -rbenchmark/ips -e 'Benchmark.ips { |x| x.report("times.map") { 1000.times.map {} }; x.report("Array.new") { Array.new(1000) {} }; x.compare! }'
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux]
Warming up --------------------------------------
times.map 976.000 i/100ms
Array.new 1.641k i/100ms
Calculating -------------------------------------
times.map 9.808k (± 0.3%) i/s - 49.776k in 5.075013s
Array.new 16.601k (± 1.0%) i/s - 83.691k in 5.041970s
Comparison:
Array.new: 16600.8 i/s
times.map: 9808.2 i/s - 1.69x slower
|
|
* As the user should not set these.
* Use #instance_variable_set/rb_iv_set() instead internally.
https://github.com/ruby/prism/commit/cace09fb8c
|
|
* Fixes https://github.com/ruby/prism/issues/2380
https://github.com/ruby/prism/commit/4eaaa90114
|
|
|
|
|
|
https://github.com/ruby/prism/commit/1a15b70a8e
|
|
https://github.com/ruby/prism/commit/f3030cb2b2
|
|
|
|
|
|
Split up the diagnostic levels so that error and warning levels
aren't mixed. Also fix up deconstruct_keys implementation.
https://github.com/ruby/prism/commit/bd3eeb308d
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
|
|
* Fixes https://github.com/ruby/prism/issues/2082
https://github.com/ruby/prism/commit/7a74576357
|
|
otherwise we get failing tests if we have non-ascii
characters in fixtures/**/*.txt
https://github.com/ruby/prism/commit/9323243569
|
|
To make typechecking easier.
https://github.com/ruby/prism/commit/8f96877d7a
|
|
https://github.com/ruby/prism/commit/4a9389f304
|
|
In an effort to further improve our documentation, this commit
introduces the concept of templating comments onto fields. I hope
to get more documentation above the nuances of specific fields this
way going forward.
With this, we template the comments into C and Ruby. I haven't done
JS or Java yet, but we can touch those in the future, especially
once their documentation is published.
https://github.com/ruby/prism/commit/af300d5fb3
|
|
This reverts commit d242e8416e99eaee4465e2681210ae8b7ecd6d34.
|
|
We should bundle released version of Prism for Ruby 3.3.0
|
|
https://github.com/ruby/prism/commit/62cc50e41b
|