ShopperCove
Menu
All writingBlogTopicsCategoriesAboutRSS
Blog
Categories
Observability & SRE62All categories
About

Topic

python

50 posts

Plate 58

lzma vs bz2 Compress: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 57

memoryview vs bytes Slice: Localhost Lab

Summary1 Oct 2026 · 3 min

Plate 82

shlex.split vs str.split: Localhost Lab

Summary1 Oct 2026 · 3 min

Plate 17

platform vs os.uname Inventory: Localhost Lab

Hands-on platform.platform vs os.uname host inventory lab: real ops/s plus cache notes, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 4 min

Plate 34

ast.literal_eval vs json.loads: Localhost Lab

Summary1 Oct 2026 · 3 min

Plate 64

selectors vs select.select: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 50

signal vs threading.Event Wakeup: Localhost Lab

Hands-on signal SIGUSR1 vs threading.Event wakeup lab: real p50 latency in microseconds, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 4 min

Plate 76

cmath vs math.hypot Magnitudes: Localhost Lab

Hands-on cmath vs math.hypot magnitude ops lab: real ops/s for abs, polar, and phase, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 3 min

Plate 59

enum.IntEnum vs int Status Codes: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 90

Path.read_text vs open().read: Localhost Lab

Summary1 Oct 2026 · 3 min

Plate 51

tracemalloc Snapshot Cost: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 09

dataclasses.asdict vs vars: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 68

gc.collect Cost Empty vs Cycles: Localhost Lab

Hands-on gc.collect cost empty vs cyclic garbage lab: real collect latency plus reclaim counts, measured on Linux localhost today in this lab for SREs.

Observability & SREHands-on1 Oct 2026 · 4 min

Plate 28

sqlite3 vs shelve Local KV: Localhost Lab

Hands-on sqlite3 vs shelve local KV store lab: real insert/get ops/s plus file sizes, measured on Linux localhost today in this hands-on lab for SREs.

Observability & SREHands-on1 Oct 2026 · 4 min

Plate 76

html.parser vs regex Tag Strip: Localhost Lab

Hands-on1 Oct 2026 · 4 min

Plate 43

copy.copy vs dict.copy Shallow: Localhost Lab

Hands-on1 Oct 2026 · 4 min

Plate 85

math.fsum vs sum Float Totals: Localhost Lab

Hands-on math.fsum vs builtin sum for float totals: real items/s plus cancellation accuracy, measured on Linux localhost in this hands-on lab for SREs.

Summary1 Oct 2026 · 4 min

Plate 77

fractions.Fraction vs float: Localhost Lab

Hands-on fractions.Fraction vs float for exact ratios: real ops/s and exactness checks, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 4 min

Plate 16

ExitStack vs Nested with Resources: Localhost Lab

Hands-on contextlib.ExitStack vs nested with and manual close: real cycles/s for N resources, measured on Linux localhost in this hands-on lab for SREs.

Observability & SREHands-on1 Oct 2026 · 3 min

Plate 40

itertools.batched vs Manual Chunking: Localhost Lab

Hands-on itertools.batched vs manual list-slice chunking: real items/s batching sequences, measured on Linux localhost today in this hands-on lab for SREs.

Observability & SREHands-on1 Oct 2026 · 3 min

Plate 35

ipaddress vs String Prefix Allowlist: Localhost Lab

Hands-on ipaddress CIDR containment vs naive string prefix allowlists: real checks/s, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 3 min

Plate 12

ChainMap vs Merged Dict Lookup: Localhost Lab

Hands-on collections.ChainMap vs merged dict config lookup: real ops/s on layered keys, measured on Linux localhost today in this hands-on lab for SREs.

Summary1 Oct 2026 · 3 min

Plate 29

functools.cache vs lru_cache(None): Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 94

graphlib Topo vs Manual Kahn: Localhost Lab

Summary1 Oct 2026 · 4 min

Plate 92

StringIO vs list-join Builder: Localhost Lab

Hands-on30 Sept 2026 · 4 min

Plate 96

Queue vs deque Threaded Handoff: Localhost Lab

Hands-on30 Sept 2026 · 4 min

Plate 17

subprocess.run vs Popen: Localhost Lab

A measured Linux localhost lab comparing subprocess.run with Popen and communicate for tiny process spawns and captured stdout.

Summary30 Sept 2026 · 4 min

Plate 64

shelve vs pickle Dict Store: Localhost Lab

A measured Linux localhost lab comparing shelve's keyed dbm store with a single pickle blob for full snapshots and random access.

Summary30 Sept 2026 · 4 min

Plate 18

fnmatch vs re Name Filter: Localhost Lab

Hands-on fnmatch.filter vs re.compile name-list filtering measured on Linux localhost.

Observability & SRELab30 Sept 2026 · 4 min

Plate 84

tarfile vs zipfile Create+Extract: Localhost Lab

Hands-on tarfile vs zipfile create+extract lab: real MB/s on a mixed small-file fixture (uncompressed tar vs zip), measured on Linux localhost for SREs.

Observability & SRELab30 Sept 2026 · 4 min

Plate 85

scandir vs listdir vs iterdir: Localhost Lab

Hands-on os.scandir vs listdir vs Path.iterdir lab: real entries/s for names and is_file on a synthetic tree, measured on Linux localhost (lab) for SREs.

Observability & SRELab30 Sept 2026 · 4 min

Plate 06

pickle vs json: Round-trip Lab

Hands-on pickle vs json local round-trip lab: real throughput and size for modest dict/list payloads (trusted data), measured on Linux localhost (lab).

Summary30 Sept 2026 · 4 min

Plate 04

csv.reader vs split: Parse Lab

Hands-on csv.reader vs str.split vs DictReader lab: real rows/s on a quoted-field CSV fixture (pandas-free parse), measured on Linux localhost for SREs.

Summary30 Sept 2026 · 4 min

Plate 41

hashlib md5 vs blake2b: Checksum Lab

Hands-on hashlib md5 vs blake2b vs sha1/sha256 lab: real MB/s checksum throughput for content-integrity hashing, measured on Linux localhost for SREs.

Observability & SRELab30 Sept 2026 · 4 min

Plate 28

glob vs rglob vs os.walk: Listing Lab

Hands-on glob.glob vs Path.rglob vs os.walk lab: real files/s for recursive file listing on a modest fixture tree, measured on Linux localhost for SREs.

Observability & SRELab30 Sept 2026 · 4 min

Plate 78

json.dumps Compact vs Indent Lab

Hands-on json.dumps separators vs indent lab: real time and byte-size tradeoffs for compact vs pretty JSON encoding, measured on Linux localhost (lab).

Observability & SRELab30 Sept 2026 · 4 min

Plate 41

shutil.copyfile vs Manual Copy Lab

Hands-on shutil.copyfile vs manual file copy lab: real MB/s versus open/read/write and Path.read_bytes on local disk, measured on Linux localhost (lab).

Observability & SRELab30 Sept 2026 · 4 min

Plate 22

str.translate vs replace: Scrub Lab

Hands-on str.translate vs replace vs re.sub lab: real ops/s for character delete and map scrubbing on mid-size strings, measured on Linux localhost (lab).

Observability & SRELab30 Sept 2026 · 4 min

Plate 46

setdefault vs defaultdict: Insert Lab

Hands-on setdefault vs if-not-in vs defaultdict lab: real ops/s for list-append and counter default insert patterns, measured on Linux localhost (lab).

Observability & SRELab30 Sept 2026 · 4 min

Plate 18

zip vs Index Pairing: Loop Lab

Summary30 Sept 2026 · 4 min

Plate 08

functools.partial vs lambda: Call Lab

Summary30 Sept 2026 · 4 min

Plate 29

statistics vs Manual mean: Stdlib Lab

Hands-on statistics vs manual mean/median/stdev lab: real ops/s for fmean, sum/len, and sorted mid versus the stdlib, measured on Linux localhost (lab).

Summary30 Sept 2026 · 4 min

Plate 28

bisect vs Linear vs set: Lookup Lab

Hands-on bisect.insort vs linear vs set lab: real ops/s for mixed sorted-list insert and membership lookup workloads, measured on Linux localhost (lab).

Summary30 Sept 2026 · 4 min

Plate 67

itertools.chain vs Flatten Lab

Summary30 Sept 2026 · 4 min

Plate 12

nlargest vs sorted[:k]: Top-k Lab

Summary30 Sept 2026 · 4 min

Plate 15

attrgetter vs getattr: Hot Loop Lab

Hands-on operator.attrgetter vs builtin getattr lab: real ops/s for extract and sort by attribute versus direct access, measured on Linux localhost only.

Observability & SRELab30 Sept 2026 · 4 min

Plate 45

Counter vs dict: Tally Lab

Hands-on collections.Counter vs dict tally lab: real ops/s for Counter.update, dict get-add, and defaultdict(int) token counting on Linux localhost (lab).

Observability & SRELab30 Sept 2026 · 4 min

Plate 72

bytes vs bytearray: Mutate/Copy Lab

Hands-on bytes vs bytearray lab: real ops/s for append/extend/slice/copy and when copy dominates over mutate, benchmarked on Linux localhost for SREs.

Summary30 Sept 2026 · 4 min

Plate 77

contextlib vs try/finally: Cleanup Lab

Summary30 Sept 2026 · 4 min

Plate 92

TemporaryFile vs NamedTemporaryFile Delete Modes Lab

Hands-on tempfile modes lab: TemporaryFile vs NamedTemporaryFile delete True/False vs mkstemp unlink patterns with real measured ops/s on localhost box.

Observability & SRELab30 Sept 2026 · 6 min
All writingBlogCategoriesTopicsAboutPrivacyRSS

© 2026 ShopperCove