Fabian Wunsch

Results 15 comments of Fabian Wunsch

just a small improvement over @nednoodlehead's solution, fixing 2 bugs: ```python from json import loads from pytube import YouTube def get_description(video: YouTube) -> str: i: int = video.watch_html.find('"shortDescription":"') desc: str...

Also a note on types: I tried to change my solution to `u16` (I'm currently using `u32`), but it was 20% slower. That's why I'm using u32.

If I follow [the docs](https://rust-lang.github.io/portable-simd/core_simd/simd/struct.Simd.html#impl-Simd%3Cu8,+N%3E), and use `cargo bench -Zbuild-std --target x86_64-unknown-linux-gnu`, the time usage goes down to 21.5ms, from 50ms.

the following test fails: `assert_eq!(simd_parse_coord(b"1 2\n "), (1, 2, 3));` The problem is, that the spaces after the newline are not ignored, and lead to an invalid pattern

This is the reason why I use `trailing_zeros` to get the number of digits, as it stops at the first one, and ignores all the other clutter. This obviously only...