Skip to content

Benchmark for multiplechoicefield#97

Open
anjaniacatus wants to merge 2 commits intodjango:mainfrom
anjaniacatus:benchmark-for-multiplechoicefield
Open

Benchmark for multiplechoicefield#97
anjaniacatus wants to merge 2 commits intodjango:mainfrom
anjaniacatus:benchmark-for-multiplechoicefield

Conversation

@anjaniacatus
Copy link

@anjaniacatus anjaniacatus commented Mar 16, 2026

This benchmark was added as part of the https://code.djangoproject.com/ticket/36913
Optimise ChoiceField / MultipleChoiceField handling of duplicate submissions

My conf for running the benchmark

{
  "version": 1,
  "project": "Django",
  "project_url": "https://www.djangoproject.com/",
  "repo": "https://github.com/anjaniacatus/django.git",
  "branches": ["ticket_36913"],
  "build_command": [
      "python -m pip install build",
      "python -m build --wheel -o {build_cache_dir} {build_dir}"
  ],
  "environment_type": "virtualenv",
  "show_commit_url": "http://github.com/anjaniacatus/django/commit/",
  "pythons": ["3.12", "3.13"]
}

cmd :
asv run --bench MultipleChoiceFieldValidate

for python3.12 : 1.26 ± 0.2ms --> 28.8 μs
for python 3.13 : 873 ± 200μs --> 28.1±3μs

@anjaniacatus anjaniacatus marked this pull request as ready for review March 16, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant