| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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');
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Use static_cast instead of reinterpret_cast when casting from void*
to another type.
This is mostly an aesthetic change but may help catch bugs when the
affected code is modified.
|
|
|
|
|
|
|
| |
Also Revert "buffer: use MAP_ANON, fix OS X build"
This reverts commit ddb15603e74e9aa865f3e1099dc2cc5886f9c46e.
This reverts commit 2433ec8276838e90136669d5b1215ba597f15fdd.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).
|
|
|
|
| |
Make Buffer:Data() and Buffer::Length() accept a Value instead of an Object.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.
Hence, this commit backs out all isolates-related changes.
Good bye, isolates. We hardly knew ye.
|
| |
|
|
|
|
| |
Closes GH-2036
|
| |
|
| |
|
|
|
|
| |
Fixes #477.
|
| |
|
|
|
|
| |
Closes GH-759.
|
|
|
|
| |
Closes GH-644.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit cd9515efd99dfa6510e72342a2621bb4b291a89c, reversing
changes made to df46c8e698b9400abaabd77ec836c7cdadf9735c.
Too slow. Needs more work.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
In order to do this, buffer data management was moved out of the
JS entry-point New, and into Replace.
Secondly, the constructor makes an immediate call to Replace, and
in order for ArrayData calls to work, wrapping must already be set
up. Now, the constructor takes the wrappee as a parameter.
|
|
|
|
| |
These were all lacking implementation, so deprecating wouldn't help.
|
| |
|
| |
|
|
|
|
| |
Implement SlowBuffer.prototype.slice in js
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
There might be an off-by-one on the returned value.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is to allow eventual realloc without messing up the data_ references in
all the slices.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
However it's not working very well: Hitting a 'hello world' server with many
requests (ab -t 60 -c 10) will cause it to crash with the following error.
Obtained 3 stack frames.
./node(_Z11print_tracev+0x1c) [0x80d1b3c]
./node(_ZN4node6Parser7ExecuteERKN2v89ArgumentsE+0x69) [0x80d3759]
./node [0x811f44b]
TypeError: Already parsing a buffer
at Socket.<anonymous> (/home/ryan/projects/node/lib/http2.js:393:20)
at IOWatcher.callback (/home/ryan/projects/node/lib/net.js:81:12)
at node.js:985:9
at node.js:989:1
|
| |
|