Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decode benchmarks, improve decode performance #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add decode benchmarks, improve decode performance #6

wants to merge 1 commit into from

Conversation

skeggse
Copy link
Contributor

@skeggse skeggse commented Mar 28, 2014

Partial fix for #1, see for improvements.

Partial fix for #1.

Signed-off-by: Eli Skeggs <eskeggs@globesherpa.com>
@tj
Copy link
Owner

tj commented Mar 29, 2014

fails for me:

        1) Message(buffer) should decode the message:

      AssertionError: expected 'r' to be 'bar'
      + expected - actual

      +"bar"
      -"r"

@skeggse
Copy link
Contributor Author

skeggse commented Mar 29, 2014

Oh, right. So that's what I mentioned in #1. If you merge the decode optimization, you'll either need to merge the encode optimization or update the encode process to add a b: prefix to buffers as per #5.

As noted, this means amp-message isn't backwards compatible.

@tj
Copy link
Owner

tj commented Mar 30, 2014

definitely an edge-case most people won't hit but I'd call it a bug, so I'm cool with prefixing. mostly just sucks to re-alloc for prefixing the buffer case

@tj
Copy link
Owner

tj commented Mar 30, 2014

hrrm yeah 2x drop for the copy() for an edge-case

tj added a commit that referenced this pull request Mar 30, 2014
@skeggse
Copy link
Contributor Author

skeggse commented Apr 14, 2014

Yeah, definitely not ideal.

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

Successfully merging this pull request may close these issues.

2 participants