-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use unique Rc<str> for SongEntries #66
Comments
Or maybe rather a |
Ughh I don't think I can use a |
rust-lang/rust#60896 (comment) |
Base benchmarks (
with the new stuff (confirmed that e.g.
|
I'm gonna test the and I should probably check memory usage - this definitely should be far lower... |
With 10 endsong files
to
not really significant |
ooops here is the one for three
|
Building upon #62
I've been testing some of this Rc cloning stuff and using
Rc::strong_count
and one thought occurred to me.Currently, in
parse
anRc<str>
is built for every single artist, album, track name. Wouldn't it be more efficient if there was only a singleRc<str>
for each unique artist, album, track name? I.e. instead of 7000xRc<str>
of"Sabaton"
, wouldn't 7000x references to a singleRc<str>
of"Sabaton"
be better?You could use three
HashSet
s (one for artist names, one for album names and one for track names). This way same album names from different artists (or track names) could be summed up under oneRc<str>
I wonder if this would improve performance or be too much overhead (with the
HashSet
s) to bring benefits...The text was updated successfully, but these errors were encountered: