Attachments (1)
Change History (15)
comment:1 by , 8 years ago
Cc: | added |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
You are right, at the time we were discussing this with Yves too. We were wondering a bit whether it would make a performance impact to use an array instead of an object. But likely won't as they are basically the same thing internally anyway. The keys are just few bytes longer.
comment:4 by , 8 years ago
Keywords: | rfc removed |
---|---|
Milestone: | Alpha 21 → Backlog |
Backlogging due to lack of progress (Use object keys instead of an array in the timer)
comment:7 by , 8 years ago
Replying to stanislas69:
Nope i totally missed the last comments
Will you be able to update the patch?
comment:9 by , 8 years ago
Re performance: it can take up to 1-2 ms to create the 2nd array currently. So not a big big impact in the grand scale of things, but would be nice to reduce.
comment:11 by , 8 years ago
Keywords: | rfc added |
---|---|
Milestone: | Backlog → Alpha 22 |
comment:13 by , 7 years ago
Keywords: | rfc removed |
---|
s/of the game, in integer/in
- Moving L40 to L41
- Removing unneeded variable
lateness
(since we have a comment mentioning that the second argument is the lateness) andstack
- Adding few newlines. Removed whitespace in empty lines.
- Using
for (let [id, timer] of this.timers)
, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map - Using
for (let id of run)
instead offor (let i = 0; i < run.length; ++i)
. With the following code snipped we can verify that the loop still works identically (considering the last statement of that loop):let run = [1, 2]; for (let id of run) { warn(id); if (run.indexOf(3) == -1) run.push(3); }
- Splitting
error
message to multiple lines - Removing self evident
// Non-repeating time - delete it
and following comments
Plus that what Vladislav said.
Here is the branch's commit: https://github.com/StanleySweet/0ad/commit/1591f2fddc8162727c4598322af32e7b3858c378