servo: Merge #3772 - layout: Shrink fragments down from 448 bytes to 128 bytes (from pcwalton:slim-down-fragment); r=metajack

16% performance improvement in layout (!)

r? @metajack (or whoever)

Source-Repo: https://github.com/servo/servo
Source-Revision: 012a80cc182ea9773f82696bf36f05820ab994b3
This commit is contained in:
Patrick Walton
2014-10-23 12:18:34 -06:00
parent 37ff1c87ed
commit 99b16dbc43
8 changed files with 128 additions and 88 deletions

View File

@@ -92,8 +92,8 @@ impl Drop for Scope {
/// Generate a unique ID. This is used for items such as Fragment
/// which are often reallocated but represent essentially the
/// same data.
pub fn generate_unique_debug_id() -> uint {
unsafe { DEBUG_ID_COUNTER.fetch_add(1, SeqCst) }
pub fn generate_unique_debug_id() -> u16 {
unsafe { DEBUG_ID_COUNTER.fetch_add(1, SeqCst) as u16 }
}
/// Begin a layout debug trace. If this has not been called,