-
Notifications
You must be signed in to change notification settings - Fork 117
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
Speed up fat32 impl #255
Speed up fat32 impl #255
Conversation
fe39eb7
to
358c497
Compare
20x! That is great. I will kick off CI here, and take a closer look tomorrow. |
358c497
to
401d6f4
Compare
CI is green, so happy to merge this in, and thank you. Do you mind linking to the product where you use it? I always like to learn more about how things are used in the wild. I took a look at what you did. Instead of storing the clusters as a map, you replaced it with a slice. Whereas for a map, the indication that a cluster is not used is the fact that it does not exist in the map, for the slice it is that the value at that position in the slice is 0. A slice is not inherently faster or slowed than a map, and indexed slice lookups vs hashed map lookups should be about the same speed. So where does the speedup come from? Is it the |
@deitch, thx for merging! Removing unused keys sort gave "only" 3x speed up, and that's b/c sort is not too slow, I think building list of keys before sort was the slower part. If you'd look at the profile, you can see that |
@deitch the project I've mentioned is an installer for the https://hedgehog.cloud/. We're a startup building a product for DCs. |
That is pretty cool. I will reach out offline to ask about it. |
Hello,
We're looking to use go-diskfs to build an air-gapped installer image for our product. It includes a bunch of files (like grub tree), OCI images, binaries and etc.
The speed up is 20+ times on bigger file systems - from 540 seconds to 23 seconds for a 1G image with two partitions of ~500MB each.
The test setup is:
Here are three profiling reports: