https://github.com/frankie567/experiments
Python experiments co-developed with Copilot
https://github.com/frankie567/experiments
Last synced: 19 days ago
JSON representation
Python experiments co-developed with Copilot
- Host: GitHub
- URL: https://github.com/frankie567/experiments
- Owner: frankie567
- License: mit
- Created: 2025-09-13T13:06:25.000Z (22 days ago)
- Default Branch: main
- Last Pushed: 2025-09-13T14:55:38.000Z (22 days ago)
- Last Synced: 2025-09-13T15:32:04.876Z (22 days ago)
- Language: Python
- Size: 122 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Experiments
This repository contains various experiments, prototypes and ideas I want to explore in Python, mostly co-developed with GitHub Copilot.
## List
### [tagflow-vs-jinja-benchmark](./tagflow-vs-jinja-benchmark/)
Performance benchmark comparing [tagflow](https://github.com/lessrest/tagflow) and [Jinja2](https://jinja.palletsprojects.com/en/stable/) for HTML generation. Tests various scenarios including simple pages, complex nested structures, and data tables. Results show Jinja2 with proper Environment setup is significantly faster across all scenarios.
### [tagflow-performance-analysis](./tagflow-performance-analysis/)
Deep performance analysis of [tagflow](https://github.com/lessrest/tagflow) bottlenecks and optimization strategies. Uses profiling to identify performance issues and implements targeted optimizations to reduce the gap with Jinja2. Explores string-based generation, context optimization, and static mode improvements.
### [tagflow-reimplementation](./tagflow-reimplementation/)
A minimal, efficient reimplementation of Tagflow from scratch that keeps the nice context manager syntax while focusing on performance. Achieves **10.79x faster** performance than original Tagflow through direct string building, explicit document objects (no globals/context vars), and minimal overhead design. Includes convenient shortcuts for common HTML tags (`doc.div()`, `doc.h1()`, etc.). Still 4.46x slower than Jinja2, but significantly closes the performance gap while maintaining the appealing programmatic API.