Javascript and function complexity -


i wondering complexity (in big o notation) of functions of prototypes (in best , worst case) in javascript ? can't find document listing these informations concerning :

  • object.assign

edit : previous cases covered in (except object.assign) what performance of objects/arrays in javascript? (specifically google v8)

can me ?

thanks help

since object.assign looping array once , assigning value object, think it's safe complexity o(n).

check out polyfill version here: https://developer.mozilla.org/en/docs/web/javascript/reference/global_objects/object/assign

it show nested loop, since 1 of loops linked length of argument passed, notation still o(x*n) => o(n)


Comments

Popular posts from this blog

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -