Updated Note Rust performance fixes (markdown)

pcwalton
2012-08-27 14:26:04 -07:00
parent 754f88c88a
commit 69bd637f81
+9
@@ -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