Skip to content

Instantly share code, notes, and snippets.

View piscisaureus's full-sized avatar
🦕

Bert Belder piscisaureus

🦕
View GitHub Profile
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js
index 74ba4d7..48dc5c3 100644
--- a/benchmark/http_simple.js
+++ b/benchmark/http_simple.js
@@ -26,14 +26,10 @@ var server = http.createServer(function (req, res) {
var n = parseInt(arg, 10)
if (n <= 0)
throw "bytes called with n <= 0"
- if (stored[n] === undefined) {
- console.log("create stored[n]");

This is a benchmark of the proposed new utf8 encoding strategy for node.js. The main reason for this is that node needs to have its "own" utf-8 encoder that properly handles surrogate pairs.

Encoding strategies:

  • new - Uses the proposed new utf8 encoder and v8::String::Memory api.
  • old_nohint - Uses v8::String::WriteUTF8 without the HINT_MANY_WRITES_EXPECTED flag.
  • old_hint - Uses v8::String::WriteUTF8 with the HINT_MANY_WRITES_EXPECTED
npm ERR! could not create prefix directory C:\Windows\SysWOW64\${APPDATA}\npm
npm ERR! Error: EPERM, operation not permitted 'C:\Windows\SysWOW64\${APPDATA}'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jade"
npm ERR! cwd C:\Windows\SysWOW64
npm ERR! node -v v0.6.11
function stackProbe() {
var depth = 25;
try {
(function inner() {
if (--depth) inner();
})();
} catch (e) {
throw new Error("Stack overflow about to happen.");
}
}
From 3af75514d92c4fb0e9608ff66584f3ddd52adf8d Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Thu, 2 Feb 2012 16:23:57 +0100
Subject: [PATCH 1/1] Windows: better stat implementation
---
src/win/fs.c | 184 ++++++++-----------------------------------------------
test/test-fs.c | 13 ++++
2 files changed, 40 insertions(+), 157 deletions(-)
From c073686cbf7f6292e64bd687ab8c25ea3ae6b10e Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Thu, 26 Jan 2012 18:52:04 +0100
Subject: [PATCH 1/1] c-ares error report
---
deps/c-ares/ares__read_line.c | 9 +++++++--
deps/c-ares/ares_gethostbyname.c | 25 +++++++++++--------------
2 files changed, 18 insertions(+), 16 deletions(-)
From 1aacdec30044c01bc89d6556fff668d53299f592 Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Wed, 1 Feb 2012 19:40:25 +0100
Subject: [PATCH 1/1] Make 32-bit msvc build prefer intrinsics over library
calls
---
src/msvc-intrinsics.h | 166 +++++++++++++++++++++++++++++++++++++++++++++++++
src/win32-headers.h | 2 +
2 files changed, 168 insertions(+), 0 deletions(-)
/* This is specific fix for a problem with the windows SDK headers when */
/* using MSVC with an x86 compilation target. On x64 the SDK would enable */
/* MSVC's _InterlockedSomething compiler intrinsics and use #define to make */
/* sure those are used instead of InterlockedSomething library calls. On */
/* x32 it doesn't even though MSVC does support many of those intrinsics. */
/* Including this header fixes that. */
#ifndef _MSVC_INTRINSICS_H
#define _MSVC_INTRINSICS_H
From 0ad2a9a2e0c82f71efaa56cf4eb31c8912703065 Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Tue, 31 Jan 2012 16:46:14 +0100
Subject: [PATCH 1/1] Small test-dgram-multicast-multi-process fixes
Somehow windows doesn't want to bind to 224.0.0.1. Let's test with a multicast
address that has no special meaning.
---
test/simple/test-dgram-multicast-multi-process.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
From eaae7879872cd8fb009460b928e7e58ae114bd61 Mon Sep 17 00:00:00 2001
From: Bert Belder <[email protected]>
Date: Tue, 31 Jan 2012 15:54:34 +0100
Subject: [PATCH 1/1] test-multicast-join: don't attempt to bind to a
multicast address
---
test/test-udp-multicast-join.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)