HF RL Explorer

Task: Optimize SQLAlchemy Insert Performance for SQLite

Task: Optimize SQLAlchemy Insert Performance for SQLite: a task in Terminal-Lego-15k (Harbor dataset). You are given a Python script that benchmarks inserting 100,000 rows into SQLite using both SQLAlchemy ORM and the raw sqlite3 driver. The SQLAlchemy approach is approximately 25 times slower…

The task

You are given a Python script that benchmarks inserting 100,000 rows into SQLite using both SQLAlchemy ORM and the raw `sqlite3` driver. The SQLAlchemy approach is approximately 25 times slower than the raw sqlite3 approach. Your task is to optimize the SQLAlchemy insertion code so that it performs within 2x the…

Part of PrimeIntellect/Terminal-Lego-15k.