Uh oh!
There was an error while loading. Please reload this page.
Memchr in std - #30381
Conversation
There was a problem hiding this comment.
Needs a real copyright header, see other files.
If you put in burntsushi's name, I want to be credited too -- the pure rust memchr impls are mine. bluss is fine.
There was a problem hiding this comment.
I've added the rust copyright header, as well as rust-memchrs license header.
@bluss I'd be glad to put your name in as well, what should I put in? It's not in the rust-memchr copyright notice.
bluss
commented
Dec 15, 2015
I think this is exciting, should be a good perf boost to stdout when writing binary data. |
bluss
commented
Dec 15, 2015
You can write in (C) bluss or another way to indicate authorship. We should resolve the license question and skip the separate license notice I think. |
bluss
commented
Dec 15, 2015
@nicokoch Do you agree with dual-licensing your contributions to @BurntSushi Do you agree with dual-licensing your contributions to I myself agree with dual licensing my contributions to rust-memchr 😄. Those are all three authors according to the git history. |
nicokoch
commented
Dec 15, 2015
Exciting, my first mini contribution to rust! No problem on my end, go ahead and include it. |
bluss
commented
Dec 15, 2015
☑️ great, then the little licensing question should be almost cleared, I have no doubt @BurntSushi will be on board as soon as he sees it. |
BurntSushi
commented
Dec 15, 2015
bluss
commented
Dec 15, 2015
☑️ relicensing done, well done team ❤️ |
e49137c to
40900afComparefhahn
commented
Dec 15, 2015
I've update the license stuff, memchr.rs now includes the Rust license header on top and a comment below which indicates the file initially comes from rust-memchr with an copyright attribution for the three contributers. |
There was a problem hiding this comment.
This is not needed (libc is already imported in lib.rs)
There was a problem hiding this comment.
I think it's probably safe to say that if we're porting to a platform which doesn't have 32 or 64-bit pointers this function will be the least of our worries. For now could these clauses in the cfg annotations just be removed?
fhahn
commented
Dec 16, 2015
I've update the commit. I also added a PR to libc that adds In the libc PR I also add |
alexcrichton
commented
Dec 17, 2015
Also yeah updating the submodule is fine, should be fine to do as soon as the libc PR lands. |
fhahn
commented
Dec 17, 2015
I've updated the submodule and the new libc binding of |
alexcrichton
commented
Dec 18, 2015
fhahn
commented
Dec 18, 2015
@Manishearth I've moved the libc import to the functions that use it |
bluss
commented
Dec 18, 2015
From travis log, the doc examples need updating (or ignoring) |
fhahn
commented
Dec 18, 2015
I've added |
alexcrichton
commented
Dec 18, 2015
bluss
commented
Dec 18, 2015
Thanks for working on this! |
bors
commented
Dec 19, 2015
⌛ Testing commit a206e55 with merge 8ad12c3... |
This PR adds `memchr`and `memrchr` based on @BurntSushi 's rust-memchr crate to libstd (as discussed in #30151). I've update some places in libstd to use memchr/memrchr, but I am not sure if there are other places where it could be used as well. ref #30076
bors
commented
Dec 19, 2015
SimonSapin
commented
Dec 22, 2015
These new functions are private to If they are to become public, I’d prefer to have a more descriptive name, similar to how |
bluss
commented
Dec 22, 2015
Yep they are an implementation detail. The relnotes-worthy thing is the performance improvements. We'll probably expand the use of these functions soon. |
bluss
commented
Dec 22, 2015
relnotes related: Improve throughput for LineWriter (and thus default stdout). |
Use the fallback impl for memrchr on non-linux The memrchr code was never used(!). This brings the memrchr improvements to non-linux platforms (LineWriter / buffered stdout benefits). Previous PR #30381
This PR adds
memchrandmemrchrbased on @BurntSushi 's rust-memchr crate to libstd (as discussed in #30151).I've update some places in libstd to use memchr/memrchr, but I am not sure if there are other places where it could be used as well.
ref #30076