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
Post a Comment