mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
layout: Shrink fragments down from 448 bytes down to 128 bytes.
16% performance improvement in layout (!)
This commit is contained in:
parent
2df236376a
commit
de5e2fd5e2
8 changed files with 128 additions and 88 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue