Some Python and Golang MongoDB testing
I did some testing on go vs python using mongodb. This all has been produced on a ubuntu test vm with 1core and 2gb memory.
I used the latest Go 1.0.3 and Pythn 2.7.3 and Mongodb 2.2.2
It does insert 10k entries and execution time was taken with “time”.
For Go I used the mgo mongodb driver and for Python I used pymongo.
In average Python did around 1050 - 1100 db inserts per second
In average Go did around 1300-1400 db inserts per second.
I did the test 10 times and took the average and at the end Go was btw. 18-19% faster
I ran the python compiled version against the go compiled version not “go run” and for python the pyc file instead the py file.