]> zoso.dev Git - buffer.git/log
buffer.git
9 years agoindex: avoid double-up of Math.pow
Daniel Cousens [Wed, 22 Apr 2015 00:40:33 +0000 (10:40 +1000)]
index: avoid double-up of Math.pow

9 years agoindex: use consistentyl |0 over >>>0 for asm
Daniel Cousens [Wed, 22 Apr 2015 00:29:27 +0000 (10:29 +1000)]
index: use consistentyl |0 over >>>0 for asm

9 years agoindex: unused result unnecessarily asm'd?
Daniel Cousens [Wed, 22 Apr 2015 00:28:19 +0000 (10:28 +1000)]
index: unused result unnecessarily asm'd?

9 years ago3.2.0
Feross Aboukhadijeh [Tue, 21 Apr 2015 10:37:17 +0000 (03:37 -0700)]
3.2.0

9 years agodon't assume ArrayBuffer will exist
Feross Aboukhadijeh [Tue, 21 Apr 2015 10:17:24 +0000 (03:17 -0700)]
don't assume ArrayBuffer will exist

9 years agohand-optimize Buffer constructor
Feross Aboukhadijeh [Mon, 20 Apr 2015 22:19:52 +0000 (15:19 -0700)]
hand-optimize Buffer constructor

The Buffer constructor is used pervasively throughout io.js, yet it was
one of the most unwieldy functions in core.  This commit breaks up the
constructor into several small functions in a way that makes V8 happy.

About 8-10% CPU time was attributed to the constructor function before
in buffer-heavy benchmarks.  That pretty much drops to zero now because
V8 can now easily inline it at the call site.  It shortens the running
time of the following simple benchmark by about 15%:

    for (var i = 0; i < 25e6; ++i) new Buffer(1);

And about 8% from this benchmark:

    for (var i = 0; i < 1e7; ++i) new Buffer('x', 'ucs2');

From
https://github.com/iojs/io.js/commit/bbf54a554ababa91ced243acb0d2721bc19
eb1dc

9 years agolink to io.js docs
Feross Aboukhadijeh [Mon, 20 Apr 2015 22:19:32 +0000 (15:19 -0700)]
link to io.js docs

9 years agoiojs style
Feross Aboukhadijeh [Mon, 20 Apr 2015 21:29:18 +0000 (14:29 -0700)]
iojs style

9 years agoremove unnecessary intermediate variables
Feross Aboukhadijeh [Mon, 20 Apr 2015 21:28:51 +0000 (14:28 -0700)]
remove unnecessary intermediate variables

9 years agoavoid .toLowerCase() call in Buffer#write()
Feross Aboukhadijeh [Mon, 20 Apr 2015 21:28:41 +0000 (14:28 -0700)]
avoid .toLowerCase() call in Buffer#write()

Avoid a costly String#toLowerCase() call in Buffer#write() in the
common case, i.e., that the string is already lowercase.  Reduces
the running time of the following benchmark by about 40%:

for (var b = Buffer(1), i = 0; i < 25e6; ++i) b.write('x', 'ucs2');

From
https://github.com/iojs/io.js/commit/4ddd6406ce1c474e1a54a5aa9b56f755490
2fd10

9 years agomatch iojs Buffer.concat signature
Feross Aboukhadijeh [Mon, 20 Apr 2015 20:51:00 +0000 (13:51 -0700)]
match iojs Buffer.concat signature

9 years agoimprove Buffer.byteLength(string, encoding)
Feross Aboukhadijeh [Mon, 20 Apr 2015 20:46:41 +0000 (13:46 -0700)]
improve Buffer.byteLength(string, encoding)

From https://github.com/iojs/io.js/pull/1441/files

9 years agostandard@3
Feross Aboukhadijeh [Mon, 20 Apr 2015 20:46:30 +0000 (13:46 -0700)]
standard@3

9 years agotape@4
Feross Aboukhadijeh [Mon, 20 Apr 2015 20:45:01 +0000 (13:45 -0700)]
tape@4

9 years ago3.1.2
Feross Aboukhadijeh [Fri, 20 Mar 2015 23:32:51 +0000 (16:32 -0700)]
3.1.2

9 years agoremove dead code
Feross Aboukhadijeh [Fri, 20 Mar 2015 23:29:42 +0000 (16:29 -0700)]
remove dead code

9 years agostyle
Feross Aboukhadijeh [Fri, 20 Mar 2015 23:29:31 +0000 (16:29 -0700)]
style

9 years ago3.1.1
Feross Aboukhadijeh [Wed, 11 Mar 2015 23:57:21 +0000 (16:57 -0700)]
3.1.1

9 years agobuffer: reword Buffer.concat error message
Feross Aboukhadijeh [Wed, 11 Mar 2015 23:25:37 +0000 (16:25 -0700)]
buffer: reword Buffer.concat error message

https://github.com/iojs/io.js/commit/31421afe897635bd86201c2e677fb881b57
a892c

9 years agoconstructor: remove non-standard noZero param
Feross Aboukhadijeh [Wed, 11 Mar 2015 23:25:04 +0000 (16:25 -0700)]
constructor: remove non-standard noZero param

9 years agozuul: drop IE6-7 tests
Feross Aboukhadijeh [Tue, 10 Mar 2015 19:59:22 +0000 (12:59 -0700)]
zuul: drop IE6-7 tests

IE6 and IE7 tests stopped working at some point, presumably because
some dependency of zuul or browserify added a dangling comma or some
feature that these browsers don't support.

I don't have the time/patience to debug this now. buffer probably works
in IE6-7 still, but I'm dropping the tests for it. If someone wants to
fix the issue and re-enable these tests, you're welcome to :)

9 years agoinclude polyfills for IE8
Feross Aboukhadijeh [Tue, 10 Mar 2015 19:56:52 +0000 (12:56 -0700)]
include polyfills for IE8

The iojs tests use features like Array.forEach, Array.isArray, etc.
that are not available in old IEs.

9 years agotests: don't bundle crypto-browserify (breaks old IEs)
Feross Aboukhadijeh [Tue, 10 Mar 2015 19:35:54 +0000 (12:35 -0700)]
tests: don't bundle crypto-browserify (breaks old IEs)

9 years agoenable accidentally disabled tests
Feross Aboukhadijeh [Tue, 10 Mar 2015 19:35:35 +0000 (12:35 -0700)]
enable accidentally disabled tests

9 years ago3.1.0
Feross Aboukhadijeh [Mon, 9 Mar 2015 22:40:10 +0000 (15:40 -0700)]
3.1.0

9 years agobuffer: add indexOf() method
Feross Aboukhadijeh [Mon, 9 Mar 2015 22:28:41 +0000 (15:28 -0700)]
buffer: add indexOf() method

Add Buffer#indexOf(). Support strings, numbers and other Buffers.

Supported in iojs@1.5.0, see:
https://github.com/iojs/io.js/commit/f212ae702e57f6d6548972e10d4374a000e
53e19

9 years agotest: pull in latest iojs tests
Feross Aboukhadijeh [Mon, 9 Mar 2015 21:35:55 +0000 (14:35 -0700)]
test: pull in latest iojs tests

9 years agoname function expressions for easier debugging
Feross Aboukhadijeh [Mon, 9 Mar 2015 21:22:42 +0000 (14:22 -0700)]
name function expressions for easier debugging

9 years agostyle: always use braces except when single-line
Feross Aboukhadijeh [Sat, 7 Mar 2015 02:11:03 +0000 (18:11 -0800)]
style: always use braces except when single-line

9 years agoMerge pull request #57 from dcousens/patch-1
Feross Aboukhadijeh [Thu, 5 Mar 2015 23:10:04 +0000 (15:10 -0800)]
Merge pull request #57 from dcousens/patch-1

index: don't use reserved keyword "byte"

9 years agoindex: don't use reserved keyword "byte"
Daniel Cousens [Thu, 5 Mar 2015 21:46:01 +0000 (08:46 +1100)]
index: don't use reserved keyword "byte"

9 years agoreadme: add note about `standard`
Feross Aboukhadijeh [Tue, 3 Mar 2015 23:00:49 +0000 (15:00 -0800)]
readme: add note about `standard`

9 years agotest: only test last 2 chrome/firefox versions
Feross Aboukhadijeh [Fri, 27 Feb 2015 16:58:22 +0000 (16:58 +0000)]
test: only test last 2 chrome/firefox versions

9 years agozuul@2
Feross Aboukhadijeh [Fri, 27 Feb 2015 15:48:16 +0000 (15:48 +0000)]
zuul@2

9 years agobrowserify@9
Feross Aboukhadijeh [Fri, 27 Feb 2015 15:48:11 +0000 (15:48 +0000)]
browserify@9

9 years agotravis: switch to iojs
Feross Aboukhadijeh [Thu, 19 Feb 2015 04:03:43 +0000 (20:03 -0800)]
travis: switch to iojs

testing to see if this makes the tests run more reliably

9 years ago3.0.3
Feross Aboukhadijeh [Thu, 19 Feb 2015 03:09:39 +0000 (19:09 -0800)]
3.0.3

9 years agoMerge pull request #55 from jessetane/remove-redundant-code-unit-size-check
Feross Aboukhadijeh [Thu, 19 Feb 2015 03:09:04 +0000 (19:09 -0800)]
Merge pull request #55 from jessetane/remove-redundant-code-unit-size-check

remove redundant code unit size check

9 years agoremove redundant code unit size check
Jesse Tane [Fri, 13 Feb 2015 21:39:23 +0000 (16:39 -0500)]
remove redundant code unit size check

9 years agostyle
Feross Aboukhadijeh [Wed, 11 Feb 2015 23:01:33 +0000 (15:01 -0800)]
style

9 years ago3.0.2
Feross Aboukhadijeh [Wed, 11 Feb 2015 23:00:04 +0000 (15:00 -0800)]
3.0.2

9 years agodon't run "iojs buffer iterator" test in browsers
Feross Aboukhadijeh [Tue, 10 Feb 2015 08:46:46 +0000 (00:46 -0800)]
don't run "iojs buffer iterator" test in browsers

most don't support iterators

9 years agotravis: need 0.12 or iojs for Iterator class
Feross Aboukhadijeh [Tue, 10 Feb 2015 02:24:13 +0000 (18:24 -0800)]
travis: need 0.12 or iojs for Iterator class

Buffers are now instances of ES6 Iterator and there's a test that
checks for that, which requires a node with a newer V8 version.

9 years agodon't compare same buffers
Feross Aboukhadijeh [Tue, 10 Feb 2015 02:21:08 +0000 (18:21 -0800)]
don't compare same buffers

Copied from iojs: https://github.com/iojs/io.js/pull/742

9 years agoFix iterator test for object implementation
Feross Aboukhadijeh [Tue, 10 Feb 2015 02:16:25 +0000 (18:16 -0800)]
Fix iterator test for object implementation

9 years agofix max size check in Buffer constructor
Feross Aboukhadijeh [Tue, 10 Feb 2015 02:16:10 +0000 (18:16 -0800)]
fix max size check in Buffer constructor

Copied from https://github.com/iojs/io.js/pull/657

9 years agopull in latest iojs buffer tests
Feross Aboukhadijeh [Tue, 10 Feb 2015 01:30:31 +0000 (17:30 -0800)]
pull in latest iojs buffer tests

9 years agoeslint: ignore consistent-this rule
Feross Aboukhadijeh [Mon, 9 Feb 2015 01:45:37 +0000 (17:45 -0800)]
eslint: ignore consistent-this rule

9 years agoJavaScript Standard Style
Feross Aboukhadijeh [Thu, 29 Jan 2015 07:35:37 +0000 (23:35 -0800)]
JavaScript Standard Style

See https://github.com/feross/standard

9 years ago3.0.1
Feross Aboukhadijeh [Wed, 31 Dec 2014 06:43:54 +0000 (22:43 -0800)]
3.0.1

9 years agoMerge pull request #54 from jessetane/revert-url-safe-base64
Feross Aboukhadijeh [Wed, 31 Dec 2014 06:03:29 +0000 (22:03 -0800)]
Merge pull request #54 from jessetane/revert-url-safe-base64

Revert url safe base64

9 years agoupdate base64-js to 0.0.8
Jesse Tane [Wed, 31 Dec 2014 05:05:36 +0000 (00:05 -0500)]
update base64-js to 0.0.8

9 years agoRevert "allow decoding url-safe base64 space and slash"
Jesse Tane [Wed, 31 Dec 2014 05:02:15 +0000 (00:02 -0500)]
Revert "allow decoding url-safe base64 space and slash"

This reverts commit 767070ece98af730d110e4905aa454db6a4a9a4c.

9 years ago3.0.0
Feross Aboukhadijeh [Wed, 24 Dec 2014 10:25:37 +0000 (02:25 -0800)]
3.0.0

9 years agoupdate node tests
Jesse Tane [Wed, 24 Dec 2014 06:07:55 +0000 (01:07 -0500)]
update node tests

9 years agocrypto-browserify doesn't work in old ie
Jesse Tane [Wed, 24 Dec 2014 06:07:45 +0000 (01:07 -0500)]
crypto-browserify doesn't work in old ie

9 years agoupdate node tests
Jesse Tane [Wed, 24 Dec 2014 03:44:48 +0000 (22:44 -0500)]
update node tests

9 years agodo not transform node tests to use tape
Jesse Tane [Wed, 24 Dec 2014 03:44:38 +0000 (22:44 -0500)]
do not transform node tests to use tape

9 years agobrowserify@7
Feross Aboukhadijeh [Wed, 24 Dec 2014 00:19:50 +0000 (16:19 -0800)]
browserify@7

9 years agoreadme: tests from node.js core are included
Feross Aboukhadijeh [Wed, 24 Dec 2014 00:19:42 +0000 (16:19 -0800)]
readme: tests from node.js core are included

9 years agocode style
Feross Aboukhadijeh [Wed, 24 Dec 2014 00:12:34 +0000 (16:12 -0800)]
code style

9 years agoMerge branch 'jessetane-copy-over-node-buffer-tests'
Feross Aboukhadijeh [Wed, 24 Dec 2014 00:09:18 +0000 (16:09 -0800)]
Merge branch 'jessetane-copy-over-node-buffer-tests'

9 years agoallow decoding url-safe base64 space and slash
Jesse Tane [Mon, 22 Dec 2014 16:10:30 +0000 (11:10 -0500)]
allow decoding url-safe base64 space and slash

9 years agodo not encode partial or invalid code points to utf8
Jesse Tane [Tue, 16 Dec 2014 00:17:57 +0000 (19:17 -0500)]
do not encode partial or invalid code points to utf8

9 years agoadd benchmark for encoding to utf8
Jesse Tane [Fri, 19 Dec 2014 20:40:25 +0000 (15:40 -0500)]
add benchmark for encoding to utf8

9 years agodo not encode partial code units to utf16
Jesse Tane [Tue, 16 Dec 2014 00:17:22 +0000 (19:17 -0500)]
do not encode partial code units to utf16

9 years agoupdate from-string tests and rename from utf16
Jesse Tane [Mon, 15 Dec 2014 23:53:47 +0000 (18:53 -0500)]
update from-string tests and rename from utf16

9 years agostrip high bit when ascii slicing
Jesse Tane [Tue, 16 Dec 2014 00:16:40 +0000 (19:16 -0500)]
strip high bit when ascii slicing

9 years agomake generic (u)int ops work when TYPED_ARRAY_SUPPORT is false
Jesse Tane [Thu, 18 Dec 2014 19:54:55 +0000 (14:54 -0500)]
make generic (u)int ops work when TYPED_ARRAY_SUPPORT is false

9 years agoadd generic functions for (u)int ops - copied from node commit 83d7d9e
Jesse Tane [Tue, 16 Dec 2014 00:13:36 +0000 (19:13 -0500)]
add generic functions for (u)int ops - copied from node commit 83d7d9e

9 years agobase64 changes to improve node compatibility
Jesse Tane [Tue, 16 Dec 2014 00:09:06 +0000 (19:09 -0500)]
base64 changes to improve node compatibility

9 years agocopy should return length
Jesse Tane [Tue, 16 Dec 2014 00:04:49 +0000 (19:04 -0500)]
copy should return length

9 years agoupdate bounds checks and throw RangeErrors instead of TypeErrors for failures
Jesse Tane [Tue, 16 Dec 2014 00:01:35 +0000 (19:01 -0500)]
update bounds checks and throw RangeErrors instead of TypeErrors for failures

9 years agofix broken max-length check
Jesse Tane [Thu, 18 Dec 2014 05:50:17 +0000 (00:50 -0500)]
fix broken max-length check

9 years agomimic SlowBuffer and Buffer#parent just enough to pass node's tests
Jesse Tane [Mon, 15 Dec 2014 23:57:07 +0000 (18:57 -0500)]
mimic SlowBuffer and Buffer#parent just enough to pass node's tests

9 years agodownload node's buffer tests
Jesse Tane [Mon, 15 Dec 2014 23:52:01 +0000 (18:52 -0500)]
download node's buffer tests

9 years agoadd downloader to pull node's buffer tests
Jesse Tane [Mon, 15 Dec 2014 23:50:35 +0000 (18:50 -0500)]
add downloader to pull node's buffer tests

9 years agonpm test: abort if node tests fail
Feross Aboukhadijeh [Mon, 22 Dec 2014 10:34:03 +0000 (02:34 -0800)]
npm test: abort if node tests fail

9 years agoMerge pull request #50 from ArtskydJ/master
Feross Aboukhadijeh [Tue, 16 Dec 2014 20:27:12 +0000 (12:27 -0800)]
Merge pull request #50 from ArtskydJ/master

put performance stats in a table

9 years agoBeautified data
Joseph Dykstra [Tue, 16 Dec 2014 00:58:48 +0000 (18:58 -0600)]
Beautified data

10 years ago2.8.2
Feross Aboukhadijeh [Sun, 7 Dec 2014 20:17:05 +0000 (12:17 -0800)]
2.8.2

10 years agodon't run browser tests in PRs
Feross Aboukhadijeh [Sun, 7 Dec 2014 19:44:09 +0000 (11:44 -0800)]
don't run browser tests in PRs

sauce labs credentials are not available on travis so tests will always
fail. feross will run the tests manually before merging any PRs.

10 years agoonly blit whole code units
Jesse Tane [Sun, 7 Dec 2014 18:27:21 +0000 (13:27 -0500)]
only blit whole code units

10 years agoadd failing test for writing partial utf16 code units
Jesse Tane [Sun, 7 Dec 2014 18:26:34 +0000 (13:26 -0500)]
add failing test for writing partial utf16 code units

10 years ago2.8.1
Feross Aboukhadijeh [Fri, 31 Oct 2014 03:42:33 +0000 (20:42 -0700)]
2.8.1

10 years agoremove testling image; test firefox 21+
Feross Aboukhadijeh [Fri, 31 Oct 2014 02:12:00 +0000 (19:12 -0700)]
remove testling image; test firefox 21+

10 years agoskip testing very old firefox versions
Feross Aboukhadijeh [Fri, 31 Oct 2014 01:54:20 +0000 (18:54 -0700)]
skip testing very old firefox versions

10 years agoreadme formatting
Feross Aboukhadijeh [Fri, 31 Oct 2014 01:27:59 +0000 (18:27 -0700)]
readme formatting

10 years agoenable opera tests (fix typo)
Feross Aboukhadijeh [Fri, 31 Oct 2014 01:24:00 +0000 (18:24 -0700)]
enable opera tests (fix typo)

10 years agoadd sauce labs testing (via zuul)
Feross Aboukhadijeh [Wed, 29 Oct 2014 09:19:33 +0000 (02:19 -0700)]
add sauce labs testing (via zuul)

10 years ago2.8.0
Feross Aboukhadijeh [Wed, 29 Oct 2014 04:13:47 +0000 (21:13 -0700)]
2.8.0

10 years agobuf.constructor = Buffer
Feross Aboukhadijeh [Wed, 29 Oct 2014 04:13:18 +0000 (21:13 -0700)]
buf.constructor = Buffer

Change made for
https://github.com/hapijs/qs/issues/39#issuecomment-60427477

10 years agoREADME: Update perf results & add firefox, safari
Feross Aboukhadijeh [Wed, 29 Oct 2014 04:11:58 +0000 (21:11 -0700)]
README: Update perf results & add firefox, safari

10 years agoexclude node buffer from one buffer perf test
Feross Aboukhadijeh [Wed, 29 Oct 2014 04:11:32 +0000 (21:11 -0700)]
exclude node buffer from one buffer perf test

10 years agoupdate node perf test results
Feross Aboukhadijeh [Wed, 29 Oct 2014 03:39:43 +0000 (20:39 -0700)]
update node perf test results

10 years agofix bug in tests
Feross Aboukhadijeh [Wed, 29 Oct 2014 03:39:18 +0000 (20:39 -0700)]
fix bug in tests

10 years agoadd test: convert to Uint8Array in modern browsers
Feross Aboukhadijeh [Wed, 29 Oct 2014 03:39:09 +0000 (20:39 -0700)]
add test: convert to Uint8Array in modern browsers

10 years agofix browser perf command
Feross Aboukhadijeh [Wed, 29 Oct 2014 01:39:30 +0000 (18:39 -0700)]
fix browser perf command

10 years agotest style
Feross Aboukhadijeh [Wed, 29 Oct 2014 01:39:19 +0000 (18:39 -0700)]
test style

10 years agodon't bundle during prepublish
Feross Aboukhadijeh [Wed, 29 Oct 2014 01:38:21 +0000 (18:38 -0700)]
don't bundle during prepublish