You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And forthose who were curious about a comparison with `numba` so [Shyba](https://github.com/shyba) implemented it and it is availablein the numba branch https://github.com/rochacbruno/rust-python-example/tree/numba.
497
+
498
+
```python
499
+
from numba import jit
500
+
501
+
@jit(nopython=True, cache=True)
502
+
def count_doubles_once_numba(val):
503
+
total = 0
504
+
chars = iter(val)
505
+
c1 = next(chars)
506
+
forc2in chars:
507
+
if c1 == c2:
508
+
total += 1
509
+
c1 = c2
510
+
return total
511
+
```
512
+
513
+
Look the new results with **numba** at the top, pretty close to **Rust**
0 commit comments