[MPlayer-dev-eng] [PATCH] Parsing simplification in vobsub
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Apr 13 22:05:06 CEST 2010
On Tue, Apr 13, 2010 at 09:50:45PM +0200, ubitux wrote:
> On Tue, Apr 13, 2010 at 09:37:24PM +0200, Reimar Döffinger wrote:
> > On Tue, Apr 13, 2010 at 03:22:04PM +0200, ubitux wrote:
> > > 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
> >
> > If I interpret this correctly, I think this means that MPlayer startup time
> > will increase from 2 to nearly 6 seconds.
>
> What? No no... Look at the bench source code, I just made 10000000 tests
> with each function. There won't be more than 1500 sscanf made (never saw
> more than 1300 subtitles) while playing a movie.
Sorry, that sure makes more sense. Seems ok to me then.
More information about the MPlayer-dev-eng
mailing list