You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the relevant data structure as it exists now:
classSweepEvent{// a pointObject is a simple object of form {'x': <number>, 'y': <number>}// it is shared with normally one, but possibly more, other SweepEventspoint: pointObject,// other stuff...}
Here's the structure I think it would be worth testing:
classSweepEvent{// flattened point object. No more sharing of these coordinates between SweepEvents with// the same points - the raw numbers would just be repeated.x: <number>,y: <number>,// other stuff...}
In addition, those point objects {'x': <number>, 'y': <number>} are passed to many helper methods/functions. Those could all be changed to just accept two separate arguments: x: <number> and y: <number>.
This could slightly increase memory usage (or decrease it? unsure how much overhead the small point objects introduce in JS) but would theoretically decrease the number of steps of dereferencing pointers to get at the values.
The text was updated successfully, but these errors were encountered:
Here's the relevant data structure as it exists now:
Here's the structure I think it would be worth testing:
In addition, those point objects
{'x': <number>, 'y': <number>}
are passed to many helper methods/functions. Those could all be changed to just accept two separate arguments:x: <number>
andy: <number>
.This could slightly increase memory usage (or decrease it? unsure how much overhead the small point objects introduce in JS) but would theoretically decrease the number of steps of dereferencing pointers to get at the values.
The text was updated successfully, but these errors were encountered: