Skip to content

Instantly share code, notes, and snippets.

View Manishearth's full-sized avatar
🍃
yahaha! you found me!

Manish Goregaokar Manishearth

🍃
yahaha! you found me!
View GitHub Profile
@Manishearth
Manishearth / measurements.txt
Last active December 8, 2017 02:37
firefox frame construction and layout measurements
Pages were opened and refreshed a few times to let the cache settle down before measuring.
"fc" is time spent in the frame constructor NOT including any style resolution that the frame constructor did.
fc-style is the amount of time the frame constructor spent resolving styles; i.e. fc + fc-style is the total amount of time spent
in the frame constructor. fc is the number that indicates potential wins from speeding up the frame constructor
Measured with https://github.com/Manishearth/gecko/commit/42d3d0d810423e07ae410a3f64c4e443be6510a7
#[inline(never)]
fn stylo(intpart: &[u32], fracpart: &[u32]) -> f32 {
let mut integral = 0.0f64;
let mut fractional = 0.0f64;
let mut factor = 0.1;
for i in intpart {
integral = integral * 10. + *i as f64;
}
for i in fracpart {
fractional += *i as f64 * factor;
incorrect vmin/vmax for overflow:scroll iframes [WONTFIX] https://bugzilla.mozilla.org/show_bug.cgi?id=1393603
./layout/reftests/css-valuesandunits/reftest.list:fails-if(styloVsGecko||stylo) == unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll-ref.html
./layout/reftests/css-valuesandunits/reftest.list:fails-if(styloVsGecko||stylo) == unit-vh-vw-overflow-scroll-x.html unit-vh-vw-overflow-scroll-x-ref.html
./layout/reftests/css-valuesandunits/reftest.list:fails-if(styloVsGecko||stylo) == unit-vh-vw-overflow-scroll-y.html unit-vh-vw-overflow-scroll-y-ref.html
./layout/reftests/css-valuesandunits/reftest.list:skip-if(Android) fails-if(stylo) != unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-scroll.html
@page, page-break-inside [YES] https://bugzilla.mozilla.org/show_bug.cgi?id=1396044
# need to fill in the PR number here
git fetch origin refs/pull/$1/merge
git diff FETCH_HEAD^..FETCH_HEAD^2 -- . ':!tests' >/tmp/p.patch
# cd to gecko dir
cd servo/
</tmp/p.patch patch -p1
./mach try -b do -p linux64-stylo -u crashtest,mochitests,reftest,reftest-1,reftest-2,reftest-3,reftest-4 -t none
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<style>
#block-start div {
border-block-start-color: red;
border-block-start-width: 2px;
border-block-start-style: dotted;
}
@Manishearth
Manishearth / stuff.md
Last active June 15, 2016 09:27
Rust GC hooks -- type system considerations

Identifying roots

As I understand it, the core of the Rust GC support functionality will be a function that looks like fn gimme_roots() -> Vec<..> or fn walk_roots<F>(f: F) where F: Fn(..). This can be implemented via LLVM stack roots and then walking them.

The first question is: What does the compiler identify as a root? On the flipside, how do GC library writers tell the compiler that something should be included in walk_roots?

Root attribute

(this solution is flawed, skip to the trace trait one if you want) One way to do this is an attribute, #[root] or something.

aaa

Uprooting

We root way too much in DOM. Let's not do that.

Magic DOM might fix a lot of problems here, and we're not certain what the performance hit of this is, so we shouldn't really do anything about this until after that. This is more of a dump of all the ideas that came up in this discussion.

Low hanging fruit: Escape analysis

There are lot of .root()s left over from the pre-dereffable-JS<T> era. These are transitively rooted and aren't being moved, so just using Deref should work. Simple escape analysis can catch these.

@Manishearth
Manishearth / gc-notes.md
Last active February 20, 2024 12:55 — forked from pnkfelix/gc-notes.md
RUST + GC NOTES

Rust GC Design

Table of Contents

TODO

GC History

The role of garbage collection (GC) in Rust has been heavily revised during the language's design. It was originally deeply integrated into