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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -