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(generator): convert tail recursion to for loop #32

Closed
wants to merge 2 commits into from

Conversation

lizthegrey
Copy link
Member

Which problem is this PR solving?

  • We spend a lot of time managing the go runtime stack and tail recursing.

Short description of the changes

  • Manually handle our stack instead.
$ ./loadgen --depth=10 --extra=10 --loglevel=info --nspans=50 --sender=dummy --tps=5000 --tracecount=-1 --tracetime=30s --debugport=6060
host: https://api.honeycomb.io:443, dataset: loadgen, apikey: ...    
ngenerators: 150000.000000 interval: 6µs
all generators started, switching to Running state
^C
shutting down from operating system signal
stopping generators from stop signal
trace counter exiting after 864856 traces
sender sent 864855 traces with 54853738 spans
$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 54853738/864855.
63.42535800798978

@lizthegrey lizthegrey requested a review from a team as a code owner January 9, 2024 00:28
@lizthegrey
Copy link
Member Author

Don't bother merging this. It makes the code much less readable, and doesn't solve the actual problem. It does make running in dummy mode marginally faster, but the real problem is fielder (see #33).

@lizthegrey lizthegrey closed this Jan 9, 2024
@lizthegrey lizthegrey deleted the lizf.tailrecurse branch June 28, 2024 20:52
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.

1 participant