Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

1 byte less per attached event #16

Closed
wants to merge 1 commit into from
Closed

1 byte less per attached event #16

wants to merge 1 commit into from

Conversation

marc-mabe
Copy link
Member

Store priority as array key as "<prio>." instead of "<prio>.0" as:

  • it also doesn't get converted to int
  • it is a compatible float format

@marc-mabe
Copy link
Member Author

Is it really required to store the priority as a string array key?

@nuxwin
Copy link

nuxwin commented Nov 29, 2015

There is maybe a valuable reason to store as 1.0 instead of 1. (think of float). At least, from a pure synthetical point of view, 1. seem really strange...

@weierophinney
Copy link
Member

Yes; due to the fact we're using array_merge, integer and float keys get
overwritten.
On Nov 29, 2015 3:12 PM, "Marc Bennewitz" notifications@github.com wrote:

Is it really required to store the priority as a string array key?


Reply to this email directly or view it on GitHub
#16 (comment)
.

@marc-mabe
Copy link
Member Author

@weierophinney shouldn't array_replace[_recursive] solve the issue?

@weierophinney
Copy link
Member

@marc-mabe No, it does not; each messes with integer and float keys, which had often unexpected and unwanted results (we even saw test failures). That code really must stay the way it is.

@weierophinney
Copy link
Member

@marc-mabe What real benefit will this patch provide? It feels like it'd be less explicit than we currently have, for very little resource consumption savings. Have you done any benchmarks that can demonstrate otherwise?

@weierophinney
Copy link
Member

Closing in favor of #17.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants