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

Adjust core::num::strconv to use fixed buffers, not heap allocated #2649

Closed
graydon opened this issue Jun 20, 2012 · 4 comments
Closed

Adjust core::num::strconv to use fixed buffers, not heap allocated #2649

graydon opened this issue Jun 20, 2012 · 4 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.

Comments

@graydon
Copy link
Contributor

graydon commented Jun 20, 2012

Uint formatting was (for a time) using fixed-size buffers on the stack. It was changed to use variable sized heap buffers when merged with strconv. That path needs to be changed back to using stack buffers ("larger than the maximum formatted number size")

@Kimundi
Copy link
Member

Kimundi commented Feb 27, 2013

This can be closed now.

@graydon
Copy link
Contributor Author

graydon commented Apr 24, 2013

The strconv change in the pull req above changed from a fast stack-allocated fixed-size buffer to a heap-allocated dynamic buffer. This is too slow to be on our regular number formatting path. I'll rename this bug to match the revised situation.

@Kimundi
Copy link
Member

Kimundi commented May 11, 2013

Just a heads up that I started reimplementing a replacement that uses stack allocation and closures similar to the old system.

@alexcrichton
Copy link
Member

This was closed in d3155fa, although the float path still performs dynamic allocation (I don't think there's a good way to avoid that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.
Projects
None yet
Development

No branches or pull requests

3 participants