[MPlayer-dev-eng] [PATCH] Parsing simplification in vobsub

ubitux ubitux at gmail.com
Tue Apr 13 15:22:04 CEST 2010


On Tue, Apr 13, 2010 at 08:00:45AM +0200, Reimar Döffinger wrote:
> On Tue, Apr 13, 2010 at 04:54:58AM +0200, ubitux wrote:
> > Are you interested in that kind of patches? The attached patch shows a
> > simpler way of parsing timestamp/filepos lines. I can also do it for
> > parse_origin and parse_id, but I'd like to know if this can be accepted.
> 
> Needs some speed testing, sscanf is _incredibly_ slow, making this code about
> 10x slower can be quite an issue.

Well, sure it's slower, but not 10x. This is what I got with the bench
file in attachment:

% ./a.out
manual: 2004721 us
sscanf: 5793554 us
%

-- 
ubitux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench.c
Type: text/x-csrc
Size: 2343 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100413/1e441ac9/attachment.c>


More information about the MPlayer-dev-eng mailing list