Skip to content

Conversation

@trevnorris
Copy link
Contributor

lib/buffer.js Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Crankshaft and TurboFan are smart enough to move the Math.pow() call to the use site but the baseline compiler probably isn't, which would mean an extra Math.pow() call in the (unoptimized) common case.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh whoops. I just moved it b/c it didn't fit in 80 chars, but brain farted that i moved it outside the if. will fix.

@mscdexmscdex added the buffer Issues and PRs related to the buffer subsystem. label Oct 23, 2015
@jasnell
Copy link
Member

@trevnorris ... would you want this in v4.x?

@trevnorris
Copy link
ContributorAuthor

@jasnell bug fix, so I think so.

@trevnorris
Copy link
ContributorAuthor

@trevnorris
Copy link
ContributorAuthor

Two unrelated failures. Everything else looks good.

@trevnorristrevnorrisforce-pushed the buf-fix-uint-write branch 2 times, most recently from 540da8d to 67d4e96CompareOctober 26, 2015 20:10
@bnoordhuis
Copy link
Member

LGTM. Consider adding tests for byteLength > 1.

@trevnorris
Copy link
ContributorAuthor

@bnoordhuis
Copy link
Member

I only see tests for byteLength == 0 and 1 or am I missing something?

trevnorris added a commit that referenced this pull request Oct 26, 2015
@trevnorris
Copy link
ContributorAuthor

Thanks for the review. Landed in 3308e5e.

@trevnorristrevnorris deleted the buf-fix-uint-write branch October 26, 2015 20:59
trevnorris added a commit that referenced this pull request Oct 26, 2015
@rvaggrvagg mentioned this pull request Oct 27, 2015
trevnorris added a commit that referenced this pull request Oct 28, 2015
@jasnell
Copy link
Member

Landed in v4.x-staging bc2120c

trevnorris added a commit that referenced this pull request Oct 29, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bufferIssues and PRs related to the buffer subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trevnorris@jasnell@bnoordhuis@mscdex