Add --enable-trace-log install option#832
Merged
ohler55 merged 1 commit intoohler55:developfrom Jan 9, 2023
Merged
Conversation
I think the trace log feature is for debugging and most people don't use it.
Therefore, I usually want to improve performance by removing unnecessary instructions.
− | before | after | result
-- | -- | -- | --
Oj.dump | 1.440M | 1.697M | 1.178x
### Environment
- Linux
- Manjaro Linux x86_64
- Kernel: 6.1.1-1-MANJARO
- AMD Ryzen 7 5800H
- gcc version 12.2.0
- Ruby 3.2.0
### Before
```
Warming up --------------------------------------
Oj.dump 142.510k i/100ms
Calculating -------------------------------------
Oj.dump 1.440M (± 0.4%) i/s - 14.536M in 10.091795s
```
### After
```
Warming up --------------------------------------
Oj.dump 165.140k i/100ms
Calculating -------------------------------------
Oj.dump 1.697M (± 0.7%) i/s - 17.009M in 10.025122s
```
### Test code
```ruby
require 'benchmark/ips'
require 'oj'
data = [[1,2,3,4,5]]*10
Benchmark.ips do |x|
x.time = 10
x.report('Oj.dump') do
Oj.dump(data)
end
end
```
Owner
|
I agree, it is rarely used to having a compile options makes sense. |
ohler55
approved these changes
Jan 8, 2023
Watson1978
added a commit
to Watson1978/oj
that referenced
this pull request
Apr 16, 2023
I forgot to change these when I was add `-enable-trace-log` install option at ohler55#832.
ohler55
pushed a commit
that referenced
this pull request
Apr 16, 2023
I forgot to change these when I was add `-enable-trace-log` install option at #832.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think the trace log feature is for debugging and most people don't use it. Therefore, I usually want to improve performance by removing unnecessary instructions.
Environment
Before
After
Test code