On Wed, 10 May 2006, Linus Torvalds wrote:Possible. Yes, ptr points to the last byte of the window for given hash value. This is so because in the matching loop the window is scrolled byte by byte and the new hash value is always made of ROBIN_WINDOW-1 bytes which already have been processed (most probably added as literal bytes in the delta buffer) plus one new byte. So it makes sense to start forward byte matching only from that last byte to find the longest source area to match, especially since all the other bytes in the window are likely to be identical already and comparing them repeatedly for entries with the same hash would be wasteful in most cases. Further down, once the best offset with the longest match in the source buffer has been found, backward matching is performed to remove as much literal bytes that were added to the delta output as possible, which is most likely to catch the whole Robin window that hasn't been compared previously, but in that case the window content is compared only once. And the reason why the reference hash is computed with an offset of 1 to RABIN_WINDOW inclusive in create_delta_index() is to allow for quick initialization of the Rabin window _outside_ of the main loop in create_delta(). There is a comment to that effect near the top of create_delta_index but probably a small reminder should be added in the index loop as well. Nicolas - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Miller | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| Jan Engelhardt | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
