You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: eliminate spurious string copies in cpp2rust converter
- mapper.cpp: use std::move() when passing local strings to
normalizeTranslationRule() to avoid unnecessary copies in ToString()
- converter.cpp recordDerivesCopy: cache Mapper::Map(f->getType())
result to avoid calling it twice per field
- converter.cpp GetDefaultAsString: cache Mapper::ToString(qual_type)
result to avoid calling it twice in successive else-if branches
- converter.cpp EmitRustStruct/VisitCXXRecordDecl: replace
std::string(keyword::kImpl) + ' ' + name with std::format to avoid
constructing multiple temporary strings
- converter_lib.cpp GetFileName: construct std::filesystem::path
directly from StringRef iterators, eliminating the intermediate
file_name_as_string copy and reusing file_path.string() as fallback
Agent-Logs-Url: https://github.com/Cpp2Rust/cpp2rust/sessions/b538d15a-35a7-4c43-93f3-6621eabaf105
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
0 commit comments