awestlake87 / pyo3-asyncio

Other
300 stars 45 forks source link

Intern strings for performance #106

Open qbx2 opened 11 months ago

qbx2 commented 11 months ago

Hello. pyo3-asyncio should apply pyo3::intern! to all constant strings to avoid duplicated string copy and unicode validation.

Example usages:

awestlake87 commented 11 months ago

Looks like PyO3 v0.20 just came out a couple hours ago, so this next release might be a good opportunity to try it out. Thanks for the suggestion!