-
Notifications
You must be signed in to change notification settings - Fork 14
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 increase for in memory decoding #15
Comments
In looking at this more closely, my change actually has an error. I hadn't realized that fast-read-byte could also return an eof-value in addition to an unsigned-byte. I would suggest fixing it to return a values if eof-value is not an (unsigned-byte 8). Hrm, in more thinking about it. There is no generic eof-value that can be an (unsigned-byte 8) since it overlaps the domain of any byte the fast-read-byte function can nominally return. So, a values is very much a solution here to return the eof-value out of the domain of (unsigned-byte 8). It also seems no current code uses the eof-value feature, so my fix is valid, but a hidden land mine. |
And, here is a patch which fixes fast-read-byte to have a 1MB cache vector when reading from the stream as opposed to byte by byte reading. This made my read performance from disk about 25% faster. This patch also includes the above patch to allow type inference to happen. |
And, here is the function I used to test it:
|
I checked out sbcl 1.3.6 and discovered that the THE patch has almost no effect, so the compiler seems to have gotten smarter, but the buffering patch indeed improved performance. So, the THE I did my initial tets with sbcl 1.3.1 and there the THE patch produce huge speedups. Now I just get the same speedups naturally with 1.3.6. |
Hello, I noticed how to get a ten times speed increase in decoding of in memory
encoded data. Thank you!
The text was updated successfully, but these errors were encountered: