Skip to content

PoC: Start centralizing de_json#5186

Open
harshil21 wants to merge 11 commits intomasterfrom
simplify-de-json
Open

PoC: Start centralizing de_json#5186
harshil21 wants to merge 11 commits intomasterfrom
simplify-de-json

Conversation

@harshil21
Copy link
Copy Markdown
Member

@harshil21 harshil21 commented Mar 29, 2026

Closes #5189

This is the benchmark I used for the results below. It includes a mix of different kind of classes and cases.

Here are the performance results:

Test Case Master (it/s) Master best (s) Master mean (µs) Branch (it/s) Branch best (s) Branch mean (µs) Change (%)
User 169460.781 0.030 5.9 163505.137 0.031 6.2 −3.5
ChatBoost 58043.702 0.086 17.4 54131.579 0.092 19.0 −6.7
BusinessConnection 50168.175 0.100 20.0 42575.756 0.117 23.7 −15.1
CallbackQuery 15806.120 0.316 63.6 18839.647 0.265 53.3 +19.2
ChatJoinRequest 62539.851 0.080 16.1 56644.010 0.088 18.4 −9.4
Message‑minimal 17122.015 0.292 58.6 21057.629 0.237 47.7 +23.0
Message‑medium 9886.712 0.506 101.7 10675.907 0.468 94.1 +8.0
Message‑heavy 4334.172 1.154 232.5 4694.056 1.065 213.5 +8.3
TransactionPartner‑user 63686.830 0.079 15.9 64283.784 0.078 15.7 +0.9
TransactionPartner‑fragment 68899.608 0.073 14.7 72328.266 0.069 13.9 +5.0
ChatMember‑member 77334.824 0.065 13.1 76181.318 0.066 13.2 −1.5
ChatMember‑administrator 56269.916 0.089 17.9 54497.678 0.092 18.5 −3.1
UserProfilePhotos 28991.156 0.172 34.7 27078.124 0.185 37.2 −6.6
InlineKeyboardMarkup 22011.970 0.227 45.6 20940.324 0.239 47.9 −4.9
Update‑message 12580.153 0.397 79.9 15165.953 0.330 66.1 +20.5
Update‑callback 13060.602 0.383 76.8 15791.913 0.317 63.6 +20.9

I'll add tests after initial review.

@harshil21 harshil21 added the 🔌 enhancement pr description: enhancement label Mar 29, 2026
@harshil21 harshil21 marked this pull request as ready for review March 31, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔌 enhancement pr description: enhancement 🛠 refactor change type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Centralize all de_json's into TelegramObject

2 participants