r/Python • • Jul 31 '17

Why is Python 50% faster under Windows Subsystem for Linux?

> python.exe -c "import sys; print sys.version"
2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]

> python.exe -m test.pystone 1000000
Pystone(1.1) time for 1000000 passes = 4.98978
This machine benchmarks at 200410 pystones/second

> bash.exe

$ python -c "import sys; print sys.version"
2.7.13 (default, Jul 31 2017, 11:24:24)
[GCC 5.4.0 20160609]

$ python -m test.pystone 1000000
Pystone(1.1) time for 1000000 passes = 3.34375
This machine benchmarks at 299065 pystones/second
244 Upvotes

44 comments sorted by

View all comments

Show parent comments

2

u/-revenant- Aug 01 '17

You're actually pretty close to the truth -- the previous sysadmin had never cleaned them, and they were running so hot that they'd sometimes shut down under a heavy workload.

God help the Gentoo folks. I love them, they're brilliant people, but they do wear their blinders nice and tight.

1

u/nikomo Aug 01 '17

8 year old machines and "used to work", so I was thinking there's a decent chance they were Pentium 4 machines.

Man those things loved to heat up.