aboutsummaryrefslogtreecommitdiffstats
path: root/integer.rb
Commit message (Collapse)AuthorAgeFilesLines
* Allow inlining Integer#-@ and #~Takashi Kokubun2020-12-221-0/+25
| | | | | | | | | | | | | | | | | | | | | | ``` $ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_integer.yml --filter '(comp|uminus)' before --jit: ruby 3.0.0dev (2020-12-23T05:41:44Z master 0dd4896175) +JIT [x86_64-linux] after --jit: ruby 3.0.0dev (2020-12-23T06:25:41Z master 8887d78992) +JIT [x86_64-linux] last_commit=Allow inlining Integer#-@ and #~ Calculating ------------------------------------- before --jit after --jit mjit_comp(1) 44.006M 70.417M i/s - 40.000M times in 0.908967s 0.568042s mjit_uminus(1) 44.333M 68.422M i/s - 40.000M times in 0.902255s 0.584603s Comparison: mjit_comp(1) after --jit: 70417331.4 i/s before --jit: 44005980.4 i/s - 1.60x slower mjit_uminus(1) after --jit: 68422468.8 i/s before --jit: 44333371.0 i/s - 1.54x slower ```
* Move docs for Integer#bit_length [ci skip]Alan Wu2020-12-141-0/+41
|
* inline Primitive.cexpr!卜部昌平2020-07-131-2/+2
| | | | | We can obtain the verbatim source code of Primitive.cexpr!. Why not paste that content into the JITed program.
* integer.rbinc: do not generate C functions卜部昌平2020-07-021-8/+4
| | | | | | | | | | | | | | | | This changeset changes for instance Integer#integer? from: == disasm: #<ISeq:to_i@<internal:integer>:66 (66,2)-(69,5)> (catch: FALSE) 0000 opt_invokebuiltin_delegate_leave <builtin!_bi7/0>, 0 (68)[LiCa] 0003 leave (69)[Re] to: == disasm: #<ISeq:to_i@<internal:integer>:66 (66,2)-(69,5)> (catch: FALSE) 0000 putself (68)[LiCa] 0001 leave (69)[Re] which is of course faster.
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2020-06-301-1/+1
|
* Mark some Integer methods as inline (#3264)Takashi Kokubun2020-06-271-0/+78
|
* Introduce Primitive.attr! to annotate 'inline' (#3242)Takashi Kokubun2020-06-201-0/+1
| | | [Feature #15589]
* C-expression does not include a semicolonNobuyoshi Nakada2020-06-211-1/+1
|
* Make Integer#zero? a separated method and builtin (#3226)Takashi Kokubun2020-06-201-0/+9
A prerequisite to fix https://bugs.ruby-lang.org/issues/15589 with JIT. This commit alone doesn't make a significant difference yet, but I thought this commit should be committed independently. This method override was discussed in [Misc #16961].