Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:(option) add option MaxInlineDepth for addjust compilation inline depth #287

Merged
merged 8 commits into from Aug 22, 2022

Conversation

AsterDY
Copy link
Collaborator

@AsterDY AsterDY commented Aug 19, 2022

feature

  • default inline depth option.DefaultMaxInineDepth is changed to 3 instead of 5 and is changeable to user
  • default pretouch recurse times option.DefaultRecurseDepth is changed to 1 instead of 0 and is changeable to user
  • Pretouch() will pretouch concrete type and pointer type both for one call now
  • add internal constant _MAX_FIELDS to limit inlining of big struct

@AsterDY AsterDY force-pushed the feat/inline_depth branch 2 times, most recently from cc2b56d to 8fdd4bd Compare August 19, 2022 09:41
} else {
vt = reflect.PtrTo(vt)
}
if err := encoder.Pretouch(vt, opts...); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possible repeat code ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Pretouch() will pretouch concrete type and pointer type both for one call now

@AsterDY AsterDY merged commit 94f95f0 into main Aug 22, 2022
@AsterDY AsterDY deleted the feat/inline_depth branch August 22, 2022 07:45
liuq19 pushed a commit that referenced this pull request Aug 29, 2022
…ine depth (#287)

* feat: make compilation depth changeable

* feat: add option `DefaultMaxInlineDepth`

* add recurse depth = 10

* refactor

* doc: readme and comment

* opt: add `_MAX_FIELDS` to limit the inlining of big struct

* update license

* fix typo
liuq19 added a commit that referenced this pull request Sep 20, 2022
* opt: faster f64toa

* feat:(option) add option `MaxInlineDepth` for addjust compilation inline depth (#287)

* feat: make compilation depth changeable

* feat: add option `DefaultMaxInlineDepth`

* add recurse depth = 10

* refactor

* doc: readme and comment

* opt: add `_MAX_FIELDS` to limit the inlining of big struct

* update license

* fix typo

* feat:(ast) support cast `null` to empty value (#278)

* fix: recompile

* test: add ftoa benchmarks

* feat: add f32toa

* fix: add license

* opt: optimize decimal

* fix benchmarks

* fix: poor performance in atof32

* test: add more integer test

Co-authored-by: liuqiang <liuqiang.06@bytedance.com>
Co-authored-by: Yi Duan <duanyi.aster@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants