Skip to content

Instantly share code, notes, and snippets.

@saethlin
Created August 6, 2017 22:11
Show Gist options
  • Save saethlin/d6e6d4a202d7d74d16029e00b0594a8b to your computer and use it in GitHub Desktop.
Save saethlin/d6e6d4a202d7d74d16029e00b0594a8b to your computer and use it in GitHub Desktop.
Python stdlib import-all timer (Windows)
Measure-Command {python -c "import string, re, difflib, textwrap, unicodedata, stringprep, rlcompleter, struct, codecs, datetime, calendar, collections, collections.abc, heapq, bisect, array, weakref, types, copy, pprint, reprlib, enum, numbers, math, cmath, decimal, fractions, random, statistics, itertools, functools, operator, pathlib, os.path, fileinput, stat, filecmp, tempfile, glob, fnmatch, linecache, shutil, macpath, pickle, copyreg, shelve, marshal, dbm, sqlite3, zlib, gzip, bz2, zipfile, tarfile, csv, configparser, netrc, xdrlib, plistlib, hashlib, hmac, secrets, os, io, time, argparse, getopt, logging, logging.config, logging.handlers, getpass, platform, errno, ctypes, threading, multiprocessing, concurrent, concurrent.futures, sched, queue, dummy_threading, _thread, _dummy_thread, socket, ssl, select, selectors, asyncio, asyncore, asynchat, signal, mmap, email, json, mailcap, mailbox, mimetypes, base64, binhex, binascii, quopri, uu, html, html.parser, html.entities, xml, xml.etree.ElementTree, xml.dom, xml.dom.minidom, xml.dom.pulldom, xml.sax, xml.sax.handler, xml.sax.saxutils, xml.sax.xmlreader, xml.parsers.expat, webbrowser, cgi, cgitb, wsgiref, urllib, urllib.request, urllib.response, urllib.parse, urllib.error, urllib.robotparser, http, http.client, ftplib, poplib, imaplib, nntplib, smtplib, telnetlib, uuid, socketserver, http.server, http.cookies, http.cookiejar, xmlrpc, xmlrpc.client, xmlrpc.server, ipaddress, audioop, aifc, sunau, wave, chunk, colorsys, imghdr, sndhdr, gettext, locale, turtle, cmd, shlex, tkinter, tkinter.ttk, tkinter.tix, tkinter.scrolledtext, typing, pydoc, doctest, unittest, unittest.mock, test, test.support, bdb, faulthandler, pdb, timeit, trace, tracemalloc, distutils, ensurepip, venv, zipapp, sys, sysconfig, warnings, contextlib, abc, atexit, traceback, gc, inspect, site, code, codeop, zipimport, pkgutil, modulefinder, runpy, importlib, parser, ast, symtable, symbol, token, keyword, tokenize, tabnanny, pyclbr, py_compile, compileall, dis, pickletools, formatter, msilib, msvcrt, winreg, winsound, optparse, imp;exit()"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment