Skip to content

Instantly share code, notes, and snippets.

View peterwmwong's full-sized avatar

Peter Wong peterwmwong

View GitHub Profile
evolve&10,13,16,19,21,23,27,30,37,41,46,48,50,52,56,58,69,77
evolve&13,16,19,50,52,58,66,69,79,84,133,161,163,165,167,170,179,180,183,187,209,216,218,228,255,258,259,263,265,268,273,283,287,300,316,329,355,363
evolve&10,13,16,19,32,48,69,74,92,133,138,161,183,187,216,263,265,293
@peterwmwong
peterwmwong / d8-macosx-with-matchAll.zip
Last active March 19, 2018 00:49
d8-macosx-with-matchAll
This file has been truncated, but you can view the full file.
@peterwmwong
peterwmwong / matchAll-spec-to-test.md
Last active March 19, 2018 00:44
An attempt to map the spec to proposed Test262 test

String.prototype.matchAll ( regexp )

Performs a regular expression match of the String representing the this value against regexp and returns an iterator. Each iteration result’s value is an Array object containing the results of the match, or null if the String did not match.

When the matchAll method is called, the following steps are taken:

  1. Let O be ? [RequireObjectCoercible][require-object-coercible](this value).
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 000000000..544721e31
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,15 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
@peterwmwong
peterwmwong / map.js
Created July 7, 2017 14:23
Comparing for-loop vs Array.p.map
'use strict';
/*
Checked CL out using...
> git fetch https://chromium.googlesource.com/v8/v8 refs/changes/39/548639/17 && git checkout FETCH_HEAD
> d8 --turbo_inline_array_builtins --allow-natives-syntax map.js
doArrayMap 2194 ms
> /p/google/v8/out.gn/x64.release/d8 test.js
testFuncExpr 1345 ms
testFuncDecl 347 ms
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>