Box DiagnosticBuilder
.
It's a large type -- 176 bytes on 64-bit. And it's passed around and returned from a lot of functions, including within PResult. This commit boxes it, which reduces memory traffic. In particular, `PResult` shrinks to 16 bytes in the best case; this reduces instruction counts by up to 2% on various workloads.
This commit is contained in:
parent
2b8116dced
commit
2fcd870711
4 changed files with 55 additions and 37 deletions
|
@ -37,7 +37,7 @@ impl Emitter for AnnotateSnippetEmitterWriter {
|
|||
&mut primary_span,
|
||||
&mut children,
|
||||
&db.level,
|
||||
db.handler.flags.external_macro_backtrace);
|
||||
db.handler().flags.external_macro_backtrace);
|
||||
|
||||
self.emit_messages_default(&db.level,
|
||||
db.message(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue