Skip to content
This repository

Mar 08, 2013

  1. Ben Noordhuis

    buffer: speed up ascii character scanning

    Speed up ASCII character scanning and conversion by 25% to 30% by scanning and
    converting whole words instead of individual bytes.
    authored December 06, 2012 isaacs committed March 08, 2013
  2. Ben Noordhuis

    buffer: strip high bits when converting to ascii

    Consider the following example:
    
      console.log(Buffer('ú').toString('ascii'));
    
    Before this commit, the contents of the buffer was used as-is and hence it
    prints 'ú'.
    
    Now, it prints 'C:'. Perhaps not much of an improvement but it conforms to what
    the documentation says it does: strip off the high bits.
    
    Fixes #4371.
    authored December 06, 2012 isaacs committed March 08, 2013

Feb 25, 2013

  1. Ben Noordhuis

    src, test: downgrade to v8 3.14 api

    authored February 25, 2013

Feb 10, 2013

  1. Ben Noordhuis

    buffer: fix Buffer::HasInstance() check

    It was returning true for typed arrays. Check that the object was
    instantiated with the Buffer constructor.
    authored February 09, 2013

Feb 07, 2013

  1. Isaac Z. Schlueter

    Merge remote-tracking branch 'ry/v0.8' into master

    Conflicts:
    	AUTHORS
    	ChangeLog
    	deps/npm/html/api/bin.html
    	deps/npm/html/api/bugs.html
    	deps/npm/html/api/commands.html
    	deps/npm/html/api/config.html
    	deps/npm/html/api/deprecate.html
    	deps/npm/html/api/docs.html
    	deps/npm/html/api/edit.html
    	deps/npm/html/api/explore.html
    	deps/npm/html/api/help-search.html
    	deps/npm/html/api/init.html
    	deps/npm/html/api/install.html
    	deps/npm/html/api/link.html
    	deps/npm/html/api/load.html
    	deps/npm/html/api/ls.html
    	deps/npm/html/api/npm.html
    	deps/npm/html/api/outdated.html
    	deps/npm/html/api/owner.html
    	deps/npm/html/api/pack.html
    	deps/npm/html/api/prefix.html
    	deps/npm/html/api/prune.html
    	deps/npm/html/api/publish.html
    	deps/npm/html/api/rebuild.html
    	deps/npm/html/api/restart.html
    	deps/npm/html/api/root.html
    	deps/npm/html/api/run-script.html
    	deps/npm/html/api/search.html
    	deps/npm/html/api/shrinkwrap.html
    	deps/npm/html/api/start.html
    	deps/npm/html/api/stop.html
    	deps/npm/html/api/submodule.html
    	deps/npm/html/api/tag.html
    	deps/npm/html/api/test.html
    	deps/npm/html/api/uninstall.html
    	deps/npm/html/api/unpublish.html
    	deps/npm/html/api/update.html
    	deps/npm/html/api/version.html
    	deps/npm/html/api/view.html
    	deps/npm/html/api/whoami.html
    	deps/npm/html/doc/README.html
    	deps/npm/html/doc/adduser.html
    	deps/npm/html/doc/bin.html
    	deps/npm/html/doc/bugs.html
    	deps/npm/html/doc/build.html
    	deps/npm/html/doc/bundle.html
    	deps/npm/html/doc/cache.html
    	deps/npm/html/doc/changelog.html
    	deps/npm/html/doc/coding-style.html
    	deps/npm/html/doc/completion.html
    	deps/npm/html/doc/config.html
    	deps/npm/html/doc/dedupe.html
    	deps/npm/html/doc/deprecate.html
    	deps/npm/html/doc/developers.html
    	deps/npm/html/doc/disputes.html
    	deps/npm/html/doc/docs.html
    	deps/npm/html/doc/edit.html
    	deps/npm/html/doc/explore.html
    	deps/npm/html/doc/faq.html
    	deps/npm/html/doc/folders.html
    	deps/npm/html/doc/global.html
    	deps/npm/html/doc/help-search.html
    	deps/npm/html/doc/help.html
    	deps/npm/html/doc/index.html
    	deps/npm/html/doc/init.html
    	deps/npm/html/doc/install.html
    	deps/npm/html/doc/json.html
    	deps/npm/html/doc/link.html
    	deps/npm/html/doc/ls.html
    	deps/npm/html/doc/npm.html
    	deps/npm/html/doc/outdated.html
    	deps/npm/html/doc/owner.html
    	deps/npm/html/doc/pack.html
    	deps/npm/html/doc/prefix.html
    	deps/npm/html/doc/prune.html
    	deps/npm/html/doc/publish.html
    	deps/npm/html/doc/rebuild.html
    	deps/npm/html/doc/registry.html
    	deps/npm/html/doc/removing-npm.html
    	deps/npm/html/doc/restart.html
    	deps/npm/html/doc/rm.html
    	deps/npm/html/doc/root.html
    	deps/npm/html/doc/run-script.html
    	deps/npm/html/doc/scripts.html
    	deps/npm/html/doc/search.html
    	deps/npm/html/doc/semver.html
    	deps/npm/html/doc/shrinkwrap.html
    	deps/npm/html/doc/star.html
    	deps/npm/html/doc/start.html
    	deps/npm/html/doc/stop.html
    	deps/npm/html/doc/submodule.html
    	deps/npm/html/doc/tag.html
    	deps/npm/html/doc/test.html
    	deps/npm/html/doc/uninstall.html
    	deps/npm/html/doc/unpublish.html
    	deps/npm/html/doc/update.html
    	deps/npm/html/doc/version.html
    	deps/npm/html/doc/view.html
    	deps/npm/html/doc/whoami.html
    	deps/npm/man/man1/global.1
    	deps/npm/man/man1/ls.1
    	deps/npm/man/man1/npm.1
    	deps/npm/man/man1/rm.1
    	deps/npm/man/man3/npm.3
    	deps/npm/node_modules/glob/glob.js
    	deps/npm/node_modules/glob/package.json
    	deps/npm/node_modules/node-gyp/package.json
    	deps/npm/node_modules/npm-registry-client/package.json
    	deps/npm/node_modules/npmconf/package.json
    	deps/npm/node_modules/read-installed/package.json
    	deps/npm/node_modules/rimraf/package.json
    	deps/npm/node_modules/rimraf/rimraf.js
    	deps/npm/package.json
    	deps/uv/src/win/error.c
    	doc/api/crypto.markdown
    	lib/zlib.js
    	src/node_version.h
    	src/node_zlib.cc
    	test/simple/test-buffer.js
    authored February 06, 2013

Feb 02, 2013

  1. Ben Noordhuis

    buffer: optimize Buffer.prototype.write(s, 'hex')

    Move the implementation to C++ land. This is similar to commit 3f65916
    but this time for the write() function and the Buffer(s, 'hex')
    constructor.
    
    Speeds up the benchmark below about 24x (2.6s vs 1:02m).
    
      var s = 'f';
      for (var i = 0; i < 26; ++i) s += s;  // 64 MB
      Buffer(s, 'hex');
    authored February 02, 2013

Feb 01, 2013

  1. Ben Noordhuis

    buffer: optimize Buffer.prototype.toString('hex')

    Move the implementation to C++ land. The old JS implementation used
    string concatenation, was dog slow and consumed copious amounts of
    memory for large buffers. Example:
    
      var buf = Buffer(0x1000000);  // 16 MB
      buf.toString('hex')           // Used 3+ GB of memory.
    
    The new implementation operates in O(n) time and space.
    
    Fixes #4700.
    authored February 01, 2013

Jan 27, 2013

  1. Ben Noordhuis

    buffer: fix Buffer::Copy regression from 00b4b7b

    If the end argument is omitted or not a number, make it default to
    the end of the buffer, not zero.
    
    Ideally, it should not matter what it defaults to because the JS shim
    in lib/buffer.js should handle that but there are still several places
    in node.js core that secrete SlowBuffers, hence Buffer::Copy() gets
    called without going through Buffer.prototype.copy() first.
    authored January 27, 2013

Jan 25, 2013

  1. Ben Noordhuis

    buffer: remove minor Buffer::Copy deoptimizations

    * Omit ToObject() call. Buffer::Data() and Buffer::Length() know how
      to deal with Values.
    
    * Don't check if the argument is undefined because it realistically
      never is and undefined->integer coercion achieves the same thing.
    authored January 25, 2013
  2. Trevor Norris

    buffer: slow buffer copy compatibility fix

    Fix issue where SlowBuffers couldn't be passed as target to Buffer
    copy().
    
    Also included checks to see if Argument parameters are defined before
    assigning their values. This offered ~3x's performance gain.
    
    Backport of 16bbecc from master branch. Closes #4633.
    authored January 22, 2013 TooTallNate committed January 25, 2013
  3. Trevor Norris

    buffer: error and misc cleanup

    Changed types of errors thrown to be more indicative of what the error
    represents. Also removed a few unnecessary uses of the v8 fully
    quantified typename.
    authored January 22, 2013 bnoordhuis committed January 25, 2013
  4. Trevor Norris

    buffer: slow buffer copy compatibility fix

    Fix issue where SlowBuffers couldn't be passed as target to Buffer
    copy().
    
    Also included checks to see if Argument parameters are defined before
    assigning their values. This offered ~3x's performance gain.
    authored January 22, 2013 bnoordhuis committed January 25, 2013

Jan 23, 2013

  1. Trevor Norris

    buffer: remove float write range checks

    Removed range checks when writing float values, and removed a few
    includes and defines. Also updated api docs to reflect that invalid 32
    bit float is an unspecified behavior.
    authored January 22, 2013 bnoordhuis committed January 23, 2013

Jan 18, 2013

  1. Isaac Z. Schlueter

    Merge remote-tracking branch 'ry/v0.8' into master

    Conflicts:
    	AUTHORS
    	ChangeLog
    	src/node_version.h
    	test/simple/test-buffer.js
    authored January 18, 2013
  2. Isaac Z. Schlueter

    buffer: Define INFINITY for MSVC compiler

    authored January 18, 2013

Jan 17, 2013

  1. Ben Noordhuis

    buffer: reject negative SlowBuffer offsets

    Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
    the creation of buffers that point to arbitrary addresses.
    
    Reported by Trevor Norris.
    authored January 17, 2013

Jan 16, 2013

  1. Trevor Norris

    buffer: floating point read/write improvements

    Improvements:
    * floating point operations are approx 4x's faster
    * Now write quiet NaN's
    * all read/write on floating point now done in C, so no more need for
      lib/buffer_ieee754.js
    * float values have more accurate min/max value checks
    * add additional benchmarks for buffers read/write
    * created benchmark/_bench_timer.js which is a simple library that
      can be included into any benchmark and provides an intelligent tracker
      for sync and async tests
    * add benchmarks for DataView set methods
    * add checks and tests to make sure offset is greater than 0
    authored December 22, 2012 isaacs committed January 16, 2013

Jan 07, 2013

  1. Ben Noordhuis

    src: pass node_isolate to Undefined()

    authored January 07, 2013
  2. Ben Noordhuis

    src: pass node_isolate to Local<>::New

    authored January 06, 2013
  3. Ben Noordhuis

    src: pass node_isolate to Integer::New

    authored January 06, 2013

Dec 28, 2012

  1. Ben Noordhuis

    buffer: speed up base64 encoding by 20%

    Remove a lot of branches from the inner loop. Speeds up buf.toString('base64')
    by about 20%.
    
    Before:
    
      $ time out/Release/node benchmark/buffer-base64-encode.js
      real    0m6.607s
      user    0m5.508s
      sys     0m1.088s
    
    After:
    
      $ time out/Release/node benchmark/buffer-base64-encode.js
      real    0m5.520s
      user    0m4.520s
      sys     0m0.992s
    authored December 24, 2012

Dec 17, 2012

  1. Isaac Z. Schlueter

    Revert "buffer: allocate memory with mmap()"

    Also Revert "buffer: use MAP_ANON, fix OS X build"
    
    This reverts commit ddb1560.
    This reverts commit 2433ec8.
    authored December 17, 2012
  2. Ben Noordhuis

    buffer: use MAP_ANON, fix OS X build

    authored December 17, 2012

Dec 16, 2012

  1. Ben Noordhuis

    buffer: allocate memory with mmap()

    Work around an issue with the glibc malloc() implementation where memory blocks
    are never returned to the operating system when they are allocated with brk()
    and have overlapping lifecycles.
    
    Fixes #4283.
    authored November 18, 2012

Dec 06, 2012

  1. Ben Noordhuis

    buffer: remove unused #includes

    authored December 06, 2012

Oct 13, 2012

  1. Nathan Rajlich

    Merge remote-tracking branch 'origin/v0.8'

    Conflicts:
    	AUTHORS
    	ChangeLog
    	deps/uv/test/runner-win.c
    	doc/api/process.markdown
    	lib/repl.js
    	src/node_crypto.cc
    	src/node_version.h
    authored October 13, 2012

Oct 10, 2012

  1. Ben Noordhuis

    buffer: report proper retained size in profiler

    Make buffers report the proper retained size in heap snapshots.
    
    Before this commit, Buffer objects would show up in the heap profiler as being
    only a few hundred bytes large, even if the actual buffer was many megabytes.
    authored October 11, 2012

Sep 13, 2012

  1. Pavel Lang

    buffer: update constructor prototype

    Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).
    authored September 13, 2012 bnoordhuis committed September 13, 2012

Aug 16, 2012

  1. Bert Belder

    Avoid compiler warning about negating unsigned value

    authored August 17, 2012

Apr 17, 2012

  1. Isaac Z. Schlueter

    MakeCallback: Consistent symbol usage

    authored April 12, 2012

Mar 30, 2012

  1. Ben Noordhuis

    buffer: fix signedness compiler warnings

    authored March 30, 2012

Mar 23, 2012

  1. Sambasiva Suda

    Avoiding unnecessary ToString() calls

    String::Utf8Value and String::AsciiValue constructors take Handle<Value>
    So no need to convert to Handle<String>
    authored March 21, 2012 bnoordhuis committed March 23, 2012

Mar 09, 2012

  1. Ben Noordhuis

    core: use proper #include directives

    authored March 10, 2012
  2. Ben Noordhuis

    buffer: throw from constructor if length > kMaxLength

    Throw, don't abort. `new Buffer(0x3fffffff + 1)` used to bring down the process
    with the following error message:
    
      FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length
      exceeds max acceptable value
    
    Fixes #2280.
    authored March 09, 2012

Feb 23, 2012

  1. Ben Noordhuis

    Remove unused variables.

    authored February 23, 2012
Something went wrong with that request. Please try again.