diff --git a/Note-Rust-performance-fixes.md b/Note-Rust-performance-fixes.md index be879ac..a2d60b6 100644 --- a/Note-Rust-performance-fixes.md +++ b/Note-Rust-performance-fixes.md @@ -2,28 +2,37 @@ This is a page of random performance ideas, mostly from pcwalton. pcwalton: graydon: there are a bunch of unnecessary allocations in trans + pcwalton: I fixed a bunch of 'em but there are certainly more + pcwalton: one thing that would very much help is a SmallVector in libstd pcwalton: fail() really needs to be a lang_item and it needs to be parameterized over ToStr + pcwalton: the idea being that if you're failing with a constant string + pcwalton: it should not call upcall_new_str_uniq() at the site of failure + pcwalton: rather it should pass a string slice (&static/str) to a function which itself copies the string + pcwalton: move the copy out of line + pcwalton: likewise fmt! generates a ton of code. most of the time the unique string it produces is not really being used, except to be written once and thrown away + graydon: mhm pcwalton: (1) stop zeroing stuff out to revoke cleanups, use a flag instead to indicate whether the dtor needs to be run (this is potentially a quite large win) + pcwalton: (2) try to coalesce failure landing pads instead of duplicating the cleanups all the time