× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Sat, Feb 24, 2018 at 1:45 PM, Turner, Kevin (ELS-CON) <
kevin@xxxxxxxxxxxxxx> wrote:

"await comes with a performance penalty" ??

What performance penalty Henrik?


I was just reviewing old discussions and came across this.

I've read that various implementations of promise-callback functionality
offer varying performance characteristics. Those comparisons are like a
factor of 1 (say 100% degradation or improvement).

The real performance concern however is when you compare async-await
functions vs. other language environments such a Python where functions
perform I/O synchronously as opposed to using an "await" to periodically
relinquish control to the Node.js event loop.

Synchronous functions in other language environments may provide something
like 25 times better performance than asynchronous functions in Node.js.

That makes sense to me. Node.js performs concurrency services within its
event loop as opposed to other architectures that rely on the underlying OS
to perform services like task swapping. Every time a Javascript function
relinquishes control to Node's event loop via the await keyword, Node will
perform its concurrency operations (through the event-loop cycle). That can
add a lot of latency that synchronous architectures don't run into.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.