Mercurial > hg
view mercurial/bdiff.h @ 32821:9b7d615108d7
smartset: micro optimize spanset.slice() to narrow range accordingly
-1ms isn't significant, but seems not bad.
revset #0: limit(0:9999, 100, 9000)
6) 0.001145
7) 0.000214
revset #3: last(0:9999, 100)
6) 0.000197
7) 0.000171
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 10 Apr 2015 00:14:16 +0900 |
parents | 9631ff5ebbeb |
children | 72985b390d7c |
line wrap: on
line source
#ifndef _HG_BDIFF_H_ #define _HG_BDIFF_H_ struct bdiff_line { int hash, n, e; ssize_t len; const char *l; }; struct bdiff_hunk; struct bdiff_hunk { int a1, a2, b1, b2; struct bdiff_hunk *next; }; int bdiff_splitlines(const char *a, ssize_t len, struct bdiff_line **lr); int bdiff_diff(struct bdiff_line *a, int an, struct bdiff_line *b, int bn, struct bdiff_hunk *base); void bdiff_freehunks(struct bdiff_hunk *l); #endif