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

SHA1 & UUID: avoid creating strings when showing #27121

Closed
StefanKarpinski opened this issue May 16, 2018 · 2 comments
Closed

SHA1 & UUID: avoid creating strings when showing #27121

StefanKarpinski opened this issue May 16, 2018 · 2 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@StefanKarpinski
Copy link
Member

See this comment: #27036 (comment)

This seems suboptimal: It seems like we should have a bytes2hex(io, bytes) method that writes the hex digits to a stream rather than allocating a string. That way you can print the hex digits directly instead of allocating a string first.

This issue is about doing the refactoring of hex2bytes and these show methods so that SHA1 and UUID values can be printed directly to an output stream without needing to allocate their string representation.

@StefanKarpinski StefanKarpinski added help wanted Indicates that a maintainer wants help on an issue or pull request good first issue Indicates a good issue for first-time contributors to Julia display and printing Aesthetics and correctness of printed representations of objects. labels May 16, 2018
@stevengj
Copy link
Member

(The UUID output does not use bytes2hex.)

@fredrikekre
Copy link
Member

#27124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

3 participants