Skip to content

perf: Optimized list conversions.#2613

Merged
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:feature/list-optimization
Mar 10, 2026
Merged

perf: Optimized list conversions.#2613
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:feature/list-optimization

Conversation

@v-ein
Copy link
Copy Markdown
Collaborator

@v-ein v-ein commented Mar 5, 2026


name: Pull Request
about: Create a pull request to help us improve
title: perf: Optimized list conversions.
assignees: @hoffstadt


Description:
This fix moves PyTuple_Size/PyList_Size and related functions out of for loops and thus improves performance on many list conversion functions like ToVectVectDouble, ToFloatVect, ToUCharVect and so on. This in turn makes faster set_value on plot series and textures, and should also improve save_image. On plot series, I got a 3x speedup on long enough data sequences.

Kudos to martin_sistemi for suggesting this fix on Discord.

Concerning Areas:
None.

@hoffstadt hoffstadt merged commit 3593506 into hoffstadt:master Mar 10, 2026
4 checks passed
@v-ein v-ein deleted the feature/list-optimization branch March 23, 2026 20:59
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.

2 participants