cdown / srt

A simple library and set of tools for parsing, modifying, and composing SRT files.
MIT License
473 stars 44 forks source link

Use re2 library if available #41

Closed cdown closed 6 years ago

cdown commented 6 years ago

I didn't see any obvious improvements in time with/without re2:

Before:

In [3]: %timeit -n 100 list(srt.parse(srt_data))
12.3 ms ± 54.1 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

After:

In [3]: %timeit -n 100 list(srt.parse(srt_data))
12.4 ms ± 79.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)