1
Fork 0

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:
Nicholas Nethercote 2019-09-12 08:29:17 +10:00
parent 2b8116dced
commit 2fcd870711
4 changed files with 55 additions and 37 deletions

View file

@ -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(),