⚡ Bolt: O(1) XML Metin Önbellekleme Optimizasyonu#32
⚡ Bolt: O(1) XML Metin Önbellekleme Optimizasyonu#32gitmuhammedalbayrak wants to merge 1 commit into
Conversation
Zaman.cpp içerisindeki XML önbellekleme mekanizmasını pugi::xml_node kopyalarından ziyade DOĞRUDAN pugi::xml_document üzerinden okunan char pointerları (const char*) önbelleğe alacak şekilde refactor edildi. Bu optimizasyon ~8.6s olan 100k iterasyonluk süreyi ~1.3s'ye indirerek yaklaşık %85'lik (6.4 kat) bir hız artışı sağladı. Co-authored-by: gitmuhammedalbayrak <44205174+gitmuhammedalbayrak@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 Ne Yapıldı:
Zaman.cpp'de pugixml ayrıştırmasıstatic const char* cached_strings[400]kullanılarak doğrudan string işaretçisi olarak önbelleğe alınacak şekilde iyileştirildi.🎯 Neden Yapıldı: Önceki XML node nesne kopyalama ya da statik olmayan düğüm işaretçisi döndürme gibi kodlar derleme hataları veya bellek kopyalama maliyetleri (O(N) lookup/kopyalama) doğuruyordu. Doğrudan sabit bir
xml_documentiçerisindeki stringleri yakalamak en güvenli ve en verimli yöntemdir.📊 Etki: 100.000 iterasyonluk benchmarkta 8.6 saniyeden 1.34 saniyeye düştü (yaklaşık 6.4 katlık performans artışı).
🔬 Nasıl Doğrulanır: Optimizasyon
tests/test_zaman.cppbirim testleriyle doğrulanabilir.make && g++ -I "./include" tests/test_zaman.cpp ./lib/zaman.o ./lib/pugi.o -o run_tests && ./run_testsile hatasız çalışmalıdır. Öğrenimler.jules/bolt.md'ye eklendi.PR created automatically by Jules for task 7123045838403050211 started by @gitmuhammedalbayrak