Skip to main content

2 posts tagged with "performance"

View All Tags

How to Measure Execution Time of a Function in Python (With Examples)

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Measuring how long your Python code takes to run is a critical skill for performance optimization, profiling, or benchmarking different approaches to solving a problem. Python offers many tools for tracking the execution time of a function — from simple built-in methods to full-blown profilers.

In this guide, we will explore multiple methods with code examples to help you choose the right one for your use case.

Best Practices for Using msgspec in Python for High-Performance Serialization

· 3 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

msgspec is a high-performance serialization library designed for modern Python applications. It combines type-safe data modeling, blazing-fast parsing, and flexible support for multiple serialization formats, including MessagePack, JSON, and TOML.

This article outlines the best practices for integrating msgspec into your codebase. It provides a practical, performance-oriented guide to writing cleaner, safer, and faster Python services.