MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / main

Function main

python/examples/performance_demo.py:323–347  ·  view source on GitHub ↗

Run all performance demonstrations.

()

Source from the content-addressed store, hash-verified

321
322
323def main():
324 """Run all performance demonstrations."""
325 print("🚀 B+ Tree Performance Demonstration 🚀\n")
326 print("This benchmark shows where B+ Tree excels compared to alternatives.\n")
327
328 benchmark_range_queries()
329 benchmark_iteration()
330 benchmark_insertion()
331 demonstrate_early_termination()
332 capacity_tuning_demo()
333 benchmark_memory_usage()
334
335 print("=== Performance Summary ===")
336 print("B+ Tree is FASTER than dict/SortedDict for:")
337 print("✓ Range queries (especially partial ranges)")
338 print("✓ Ordered iteration")
339 print("✓ Early termination scenarios")
340 print("✓ Large dataset operations")
341 print()
342 print("B+ Tree may be SLOWER for:")
343 print("• Random single-key lookups")
344 print("• Small datasets (< 1000 items)")
345 print("• Insertion-heavy workloads")
346 print()
347 print("Choose B+ Tree when you need fast, ordered access to ranges of data!")
348
349
350if __name__ == "__main__":

Callers 1

Calls 6

benchmark_range_queriesFunction · 0.85
benchmark_iterationFunction · 0.85
benchmark_insertionFunction · 0.85
capacity_tuning_demoFunction · 0.85
benchmark_memory_usageFunction · 0.85

Tested by

no test coverage detected