Hacker Newsnew | past | comments | ask | show | jobs | submit | nbpname's commentslogin

Grafting is indeed a good solution for fast security updates, except that the way this is implemented in Guix depends on the maintainer of each package. This is indeed better than Nix which relies on asking every user to replace the dependencies.

A few years ago, I made a proposal to have some automatic grafting mechanism: https://github.com/NixOS/nixpkgs/pull/10851

This would automagically work by simply maintaining 2 trees of Nixpkgs, one with the cherry-picked security updates, and one which matches the latest set of cached packages. This way one can fully benefit from the cached packages while having the ability to replaces with the latest security patches they want to import without building the world.

Unfortunately, rewritting Nixpkgs to fit the requirements needed to have the automagic mechanism is a huge project, especially given the activity of Nixpkgs. Maintaining a fork of Nixpkgs which stays up-to-date while changing its inner working cannot be held by a single person.

My hopes would be to push this to the Nixpkgs Architecture Team, while preventing them from doing mistakes by inserting extra complexity while making this work more challenging.


Interesting!

The current design seems to uses 3 transducers at 2.25 MHz with a static phase shifter added on top of the transducers. Then they capture floating / dropping particles which are moving past the design that they want to be printing.

I am currently working on building a similar mechanism as a pet project, inspired by the SonicSurface[1], with the goal of having a dynamic hologram while not requiring a huge computer hidden in the back.

[1] https://www.instructables.com/SonicSurface-Phased-array-for-...


I have similar results when running the code in the Firefox devtools console, however, running these benchmarks in a dedicated webpage does not show the results.

When using a dedicated web page, I see results which are in the same ranges as NodeJS and Chrome: (not comparable, as running on different hardware)

   Started data Local (original) foo.html:120:11
  Finished data locality test run in  8.6800 ± 1.3095  ms. foo.html:144:11
   Started data Non-local (original) foo.html:120:11
  Finished data locality test run in  38.9400 ± 1.6195  ms. foo.html:144:11
   Started data Local foo.html:120:11
  Finished data locality test run in  6.6600 ± 1.1390  ms. foo.html:144:11
   Started data Non-local foo.html:120:11
  Finished data locality test run in  38.6400 ± 1.5861  ms. foo.html:144:11
   Started data Non-local (sorted) foo.html:120:11
  Finished data locality test run in  12.1800 ± 1.8334  ms. foo.html:144:11
   Started data Local (object) foo.html:120:11
  Finished data locality test run in  14.4500 ± 1.1492  ms. foo.html:144:11
   Started data Non-local (object) foo.html:120:11
  Finished data locality test run in  49.0000 ± 1.6576  ms. foo.html:144:11
   Started data Non-local (sorted array of indices) foo.html:120:11
  Finished data locality test run in  53.8500 ± 2.9725  ms.
I opened a bug against the devtools console of Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1647276


Ah! So that's what it is. :( I did the same thing in as you did and I'm now getting much fast times.

I feel a bit silly now for not having looked into it further before posting those obviously suspicious times.

Edit: and thank you for taking care of the bug report!


I am no expert in the front-end of Firefox, but a search highlight files such as "tabbrowser.css" and "tabbrowser.js".

Have fun: https://searchfox.org/mozilla-central/search?q=&case=false&r...


This feature is really cool, however the ratio of parse-time and compile-time improvement is not always meaningful to end users. I would be curious to see the absolute & relative load-time gains.

When I was benchmarking Firefox on the same feature [1], back in November 2017, I noticed that reddit loads very little JavaScript that any improvement on it does not matter.

Also, I wish that the benchmark website domains were not truncated, such as "http://www.", and better distinguish websites such as "http://reddit." (for http://reddit.musicplayer.io) as opposed to "http://www.reddit." (for http://www.reddit.com).

[1] https://blog.mozilla.org/javascript/2017/12/12/javascript-st...


Websites are built to fit within the existing constraints of the web platform. It's important to look beyond what sites are doing today and instead look at what they cannot do. It's basically this story for web performance [1]. Here you're suggesting profiling and optimizing website designs that 'survive' and make it production but you're failing to observe designs and sites that don't make ship because of performance issues and you're just trying to optimize against cases where the designs survive.

In general parse-time and compile-time is meaningful enough that large websites are spending a considerable amount of effort and energy playing 'code golf' to keep JS size down otherwise engagement will suffer.

[1] https://medium.com/@penguinpress/an-excerpt-from-how-not-to-...


They mention near the end of the article that it improved overall page loads (time to interactive) on Android 1-2%


Fairly small, but all improvement is obviously welcome.


1-2% on a large scale is pretty significant. If each request on average takes, say, a second, and is then reduced by 1-2%, that'd be 990ms. 10ms saved per request.

Let's say that on average, 5 uncached pages are opened per day per chrome-mobile user. I don't feel like looking up the total amount of Chrome-mobile users, let's estimate that at 500 million.

5 page loads * 500,000,000 users * 10 ms = 25000000000ms per day saved, that's 289 days of page loading saved on a global scale per day.

I don't personally think measuring the improvement in terms of time is very interesting, it's very hard to interpret, but each ms of loading takes up a certain percentage of your battery, the amount of electricity saved daily on a global scale because of an improvement of 1-2% is fairly significant.


I'd argue that as long as it doesn't increase CPU load, those 1-2% are very worth it on mobile. It's potentially 2% battery saved.


Only if your phone is spending all its time parsing javascript, and maybe 1% (being generous) of its CPU time is spent doing that for a JS heavy page. So 1% of 1%. Really not much at all.


Facebook.com, LinkedIn.com, and Google Sheets ship ~1MB of JS compressed for their main pages, which is 5-10 MB of JS uncompressed. So JS parsing time ends up taking hundreds of milliseconds on initial load.

And of course, people want to build even richer experiences (live streaming, 360 media, etc) so there is a lot of appetite for loading more code in the same amount of time.


The goal is to optimize the code both at compile-time and at run-time. We need to optimize it at compile time to prevent slow start-up, and we need to optimize it at run-time to benefit from profile guided optimizations.


Both the reference to the GraalVM and a pun are intentional.


Maybe make its slogan: "HolyJit, it's fast!" -- with the double meaning and all.


It sounds more than likely that HolyJit will use Cretonne as a backend.

For the moment it uses dynasm, just to get the prototype working, but I expect to change that in the upcoming months.

(I am the author of HolyJit)


For both SpiderMonkey and v8, this is counting the number of calls to the MacroAssembler. SpiderMonkey commonly use the prefix "masm", while v8 uses the macro "__ " to alias the MacroAssembler.

The MacroAssembler, is basically what is used to produce assembly code in both JavaScript engines.


Overlays is a way to extend Nixpkgs in a format which can easily be shared, imported and combined. An overlay can add or override packages, like any user could do before with packageOverrides.

An example of overlay is the rust overlay provided in the nixpkgs-mozilla[1] repository, which package all latest versions of the rust compiler[2].

[1] https://github.com/mozilla/nixpkgs-mozilla [2] https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: