38 Matching Annotations
  1. Nov 2023
    1. A more efficient but more complicated way to simulate perfect guessing is to guess both options simultaneously

      NB: Russ talking here about flattening the NFA into a DFA that has enough synthesized states to represent e.g. in either state A or state B. He's not talking about CPU-level concurrency. But what if he were?

  2. Aug 2023
    1. Serializing the data with a function specialized to your data shape can be more than 10x compared with JSON.stringify.
  3. Jul 2023
    1. I tried precompiling the JavaScript code to QuickJS bytecode (to avoid parsing overhead), but that only saved about 40 milliseconds (I guess parsing is really fast!).
    1. only a small fraction of the features of each component, and your program con-sumes 10 or 100 times the hardware resources of a fully custom program, butyou write 10% or 1% of the code you would have written 30 years ago.

      You use only a small fraction of the features of each component, and your program consumes 10 or 100 times the hardware resources of a fully custom program, but you write 10% or 1% of the code you would have written 30 years ago.

  4. Dec 2022
    1. If you write an algorithm in a straightforward way in Node, you can expect it to run about as fast as if you write it in a vectorized way using Numpy, or twenty times as fast as if you write it in a straightforward way in CPython.
  5. Nov 2022
    1. Rust lets us explicitly state our desires to the compiler

      This is the key. It follows that the same results, then, could be seen if we devised a way to communicate the same desires to the machine when we're dealing with JS. (My preferred thought experiment: imagine a docs/ directory in the repo where these sorts of things are documented for the benefit of other programmers—alongside any other rationale that you would naturally hope to communicate as well—and that the computer itself were made to be able to read and act upon the very same documentation to guide its behavior.) See http://cr.yp.to/qhasm/literature.html

  6. Aug 2022
    1. The lack of CPU power in those days also meant there was deep skepticism about the performance of interpreters in general, and in the user interface in particular. Mention "interpreted language" and what sprung to mind was BASIC or UCSD Pascal, neither regarded as fast.

      still widely held today

    1. The more I think about it, the less I think there is a meaningful definition of the one true run time. I have put significant effort into making sure that runtimes are consistent but, however we do this, it makes our experiments less realistic. With rare exceptions (perhaps some safety critical systems) our algorithms will not be used in highly controlled situations, moderated to reduce variability between runs or to maximise speed of this particular process. Algorithms will be run as part of a larger system, in a computer sometimes with many other processes and sometimes with few and, because of the way that computing has developed, sometimes in raw silicon and sometimes in virtual machines. So the more I think about it, the more I think that what matters is the distribution of run times. For this, your experiment on your hardware is important, but so are future recomputations on a wide variety of VMs running on a variety of different hardware.

      The truth of this has consequences not just for the metaissue of recomputation, but the entire raison d'etre of doing performance studies to begin with.

    2. If I can’t run your experiment at all, then I can’t reproduce your times.
  7. Jul 2022
    1. Another key idea here is to separate meaning from tactics. E.g. the meaning of sorting is much simpler and more compact than the dozens of most useful sorting algorithms, each one of which uses different strategies and tactics to achieve the same goal. If the “meanings” of a program could be given in a way that the system could run them as programs, then a very large part of the difficulties of program design would be solved in a very compact fashion. The resulting “meaning code” would constitute a debuggable, runnable specification that allows practical testing. If we can then annotate the meanings with optimizations and keep them separate, then we have also created a much more controllable practical system.
  8. Apr 2022
    1. The law of the "Wild West of Programming" was still held in too high esteem! The same inertia that kept many assembly code programmers from ad- vancing to use FORTRAN is now the principal obstacle against moving from a "FORTRAN style" to a structured style.
    2. The amount of resistance and prejudices which the farsighted originators of FORTRAN had to overcome to !gMn acceptance of their product is a memorable indication of the degree to which programmers were pre- occupied with efficiency, and to which trick- ology had already become an addiction
  9. Mar 2022
    1. I just dislike how non-native it feels and looks.

      I suspect VS Code's non-native look has actually contributed to the uptake from a subset of its users. A fullscreen terminal-based editor like Vim is also non-native as far as widget sets are concerned, but pleasantly so in at least one respect. When Chrome was released, when you asked people what they liked about it, sure they'd say it was fast and whatnot, but for a non-trivial segment of the world, they just liked how visually slim it was. They appreciated how little chrome was actually in Chrome. VS Code managed to reap dividends on its imports of the same approach to its "shell", even while not being particularly fast. (People point to VS Code as an example of a snappy Electron app, and they're not wrong insofar as the comparison goes to other typical Electron apps; on an absolute, non-weight-class-adjusted scale, though, VS Code is still pretty clunky—people just ignore it because of how slim it appears in comparison to IDEs like MonoDevelop[1].)

      1. https://upload.wikimedia.org/wikipedia/commons/0/01/Monodevelop-main-window.png
  10. Aug 2021
    1. This still would not eliminate all delay, but I think this could be faster (no render blocking), and cleaner than having inline scripts scattered all over the parent document.
  11. Jul 2021
  12. Jun 2021
  13. Mar 2021
    1. You could also use the NodeIterator API, but TreeWalker is faster
    2. All those 'modern' and 'super-modern' querySelectorAll("*") need to process all nodes and do string comparisons on every node.
    3. the fastest solution because the main workload is done by the Browser Engine NOT the JavaScript Engine
  14. Jan 2021
    1. Just saying “snaps are slow” is not helpful to anyone. Because frankly, they’re not. Some might be, but others aren’t. Using blanket statements which are wildly inaccurate will not help your argument. Bring data to the discussion, not hearsay or hyperbole.
    2. I don’t find the software slow, I find the startup time for snap packages when the start for the first time on a session slow, but that has been improved, and it’s public that the snapcraft team has been working hard to improve that.
  15. Dec 2020
    1. The template language's restrictions compared to JavaScript/JSX-built views are part of Svelte's performance story. It's able to optimize things ahead of time that are impossible with dynamic code because of the constraints. Here's a couple tweets from the author about that
    1. Because Jamstack projects don’t rely on server-side code, they can be distributed instead of living on a single server. Serving directly from a CDN unlocks speeds and performance that can’t be beat. The more of your app you can push to the edge, the better the user experience.
    1. Better PerformanceWhy wait for pages to build on the fly when you can generate them at deploy time? When it comes to minimizing the time to first byte, nothing beats pre-built files served over a CDN.
  16. Nov 2020
    1. It's fast. The Dart VM is highly optimized, and getting faster all the time (for the latest performance numbers, see perf.md). It's much faster than Ruby, and close to par with C++.
  17. Oct 2020
    1. Virtual DOM is valuable because it allows you to build apps without thinking about state transitions, with performance that is generally good enough
    2. In the vast majority of cases there’s nothing wrong about wasted renders. They take so little resources that it is simply undetectable for a human eye. In fact, comparing each component’s props to its previous props shallowly (I’m not even talking about deeply) can be more resource extensive then simply re-rendering the entire subtree.
  18. Sep 2020
  19. Aug 2020
    1. For example, to search for text occurrences, I used ack-grep. Later on, I found that there is a faster approach using ag. Then, there is an even faster alternative called ripgrep.
  20. Jul 2020
    1. Building blocks that ensure performance It takes a lot of time and effort to build a great website. AMP components are already optimized for the best performance.
  21. Jun 2020
    1. uses a pre-clone step to seed the project with a recent archive of the repository. This is done for several reasons: It speeds up builds because a 800 MB download only takes seconds, as opposed to a full Git clone.
  22. Apr 2020
  23. Feb 2020
  24. Jun 2019
    1. This is especially true for online gaming

      WASM is being used to run many demanding applications directly in the browser. Autocad is one important example where architects can use this application without installing a usually very heavy piece of software on their computers. They can access the Autocad suite from almost any computer only by logging into to a website. It is expected that a large part of the gaming industry will shift this way as well as many other services. One of the main advantages of this approach aside from a lack of a local installation is real-time software updates for any number of users. A new model of software building and execution will be based on WASM. WASM is also very good for blockchains. Search for the WASM section to learn more.