DEV Community

Discussion on: Extending Python with Rust

 
idkravitz profile image
Dmitry Kravtsov

So I implemented a single allocation version in Rust with itoa crate. The results exceeded my expectations:

Name (time in us) Mean
test_rust_concat_mutable 7.9843 (1.0)
test_rust_concat2 90.8439 (11.38)
test_rust_concat 92.4594 (11.58)
test_concat_comprehension 202.4457 (25.36)
test_concat_join 238.2960 (29.85)
test_concat_basic 360.8961 (45.20)

Mutable implementation can be found in this gist

Thread Thread
 
p_chhetri profile image
Pradeep Chhetri

Nice Dmitry, this looks awesome.