| 8 | |
| 9 | Some discussion was performed on Phab:rP25119 (text by smiley): |
| 10 | Maybe explicitly defining serializable properties might be cleaner. And if performance is the concern, setting a boolean is definitely faster than deleting properties and re initializing them again. There is also the issue of type optimizations potentially. |
| 11 | |
| 12 | Potential performance impacts would depend on the JS engine, but I recall from some earlier benchmark that delete was kinda expensive since further lockups would result in searching the prototype chain. Also, it might change the object layout. Moreover, SM JIT does not play well with delete on arrays and hitting array holes was like hitting a wall. Given the underlying JS array implementation, I would not be surprised if the same behavior was found in objects as well. |
| 13 | |
| 14 | I haven't redone those tests in current SM version. So, take that however you will. |