Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`rb_scan_args(argc, argv, "01&", ...)` will generate `Proc` object from block. However, the object has used to only check whether block was given. To remove redundant object generating, this patch will use `rb_block_given_p()` to check whether block was given. * Before ``` Warming up -------------------------------------- query 845.000 i/100ms each 86.916k i/100ms fields 231.527k i/100ms Calculating ------------------------------------- query 9.553k (± 2.0%) i/s - 48.320k in 5.059947s each 1.133M (± 0.3%) i/s - 5.736M in 5.062606s fields 6.319M (± 0.1%) i/s - 31.719M in 5.019960s ``` * After ``` Warming up -------------------------------------- query 864.000 i/100ms each 106.916k i/100ms fields 251.255k i/100ms Calculating ------------------------------------- query 9.457k (± 3.8%) i/s - 47.520k in 5.032949s each 1.550M (± 0.3%) i/s - 7.805M in 5.037029s fields 6.233M (± 0.1%) i/s - 31.407M in 5.039049s ```
- Loading branch information