Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

34
Vistas
How does awaiting synchronous functions affect nodejs performance?

I encountered a practice were developers make synchronous functions asynchronous in order to make less adjustments in the future if and when the functions may change to asynchronous. What I would like to know is what is the price paid for such a practice, I assume the cost is in performance but if there is another cost I would like to know as well

const sum = async (a,b) => a + b // Made async as preparation for unknown future changes 

const someAsncFunc = async (...) => {
  ...
  const res1 = await someRealAsyncFunc(...)
  ...
  const res2 = await sum(a, b)
  ...
}
7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.