Plurrrr

Mon 28 Dec 2020

The Performance Overhead of JavaScript Promises and Async Await

JavaScript as a language is heavily asynchronous, with promises being deeply integrated. The inclusion of async/await syntax has massively improved this, making asynchronous code much more readable. Being able to mark methods as async makes it much easier to integrate into existing parts of code, sometimes causing large chains of method calls to become async for a single deep method call. While this is sometimes the best solution, can the overhead of promises pose a problem for hot code?

Source: The Performance Overhead of JavaScript Promises and Async Await, an article by Matthew Miller.

6 Small Unit Testing Tips

Choosing test values when writing unit tests is mostly guided by the need to cover all cases of the program logic. However, some values are better than others. Here are a few tips on how to pick values that make mistakes easy to spot and the tests easy to read. Plus a bonus tip on a quick way to double check your tests.

Source: 6 Small Unit Testing Tips, an article by Henrik Warne.