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

implements compact and options{compact:true} #8

Merged
merged 4 commits into from Oct 16, 2012
Merged

Conversation

bkw
Copy link
Collaborator

@bkw bkw commented Oct 15, 2012

@felixge: care to comment on this?

I decided only to compact on buffer-reusing writes for now. Compacting on every read felt excessive, but then again, slice() is very efficient. What do you think?

@ghost ghost assigned felixge Oct 15, 2012
bkw added a commit that referenced this pull request Oct 16, 2012
implements compact and options{compact:true}
@bkw bkw merged commit 41aeb3b into felixge:master Oct 16, 2012
if (this.offset < 1) {
return;
}
this._buffer = this._buffer.slice(this._offset);
Copy link
Owner

Choose a reason for hiding this comment

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

Nitpick: I <3 vertical whitespace. IMO there should be an empty line above this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

and right you are, sir!

@felixge
Copy link
Owner

felixge commented Oct 17, 2012

Patch LGTM.

I decided only to compact on buffer-reusing writes for now. Compacting on every read felt excessive, but then again, slice() is very efficient. What do you think?

I think that we need that benchmark - these JS VM's are magic 🌟

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.

None yet

2 participants