Sunday, July 07, 2019

Python vs. Go vs. Rust

Python, Go, Rust mascotsOne Program Written in Python, Go, and Rust – Nicolas Hahn

nicolashahn (Nicolas Hahn) @GitHub

nicolashahn/diffimg: Differentiate images in python - get a ratio or percentage difference, and generate a diff image

nicolashahn/diffimg-go: Image differentiation tool similar to the python diffimg: 

nicolashahn/diffimg-rs: image differentiation tool written in Rust


Image size: 1x1 2000x2000 10,000x10,000
Rust 0.001s 0.490s 5.871s
Go 0.002s (2x) 0.756s (1.54x) 14.060s (2.39x)
Python 0.095s (95x) 1.419s (2.90x) 28.751s (4.89x)

Authors conclusion:

"If I had to choose the language for the backend of a new web application, it would be Go."