Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
What is the time complexity of object spread operator in Javascript?

I found that there are some QAs about spread operator time complexity but those are all for array.

Is the spread operator time complexity same for object?

a = { ...b }

What is the time complexity of the above statement if the key count of b is N?

is it O(N)?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's O(n). Object spread iterates through all enumerable own properties and assigns them to a new object, and property assignment is an O(1) process. If there are N keys to iterate through, there are around N such operations to perform.

That said, this here will not be a bottleneck in 99.9% of actual code, so it's not worth worrying about.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda