(no title)
dotdi
|
2 months ago
This is not an apples-to-apples comparison. Python needs to load and interpret the whole requests module when you run the above program. The golang linker does dead code elimination, so it probably doesn't run anything and doesn't actually do the import when you launch it.
maccard|2 months ago
dotdi|2 months ago
dekhn|2 months ago
I believe in the past people have looked at putting the standard library in a zip file instead of splatted out into a bunch of files in a dirtree. In that case, I think python would just do a few stats, find the zipfile, loaded the whole thing into RAM, and then index into the file.
maccard|2 months ago
"If python was implemented totally different it might be fast" - sure, but it's not!