Skip to content

Instantly share code, notes, and snippets.

View mraleph's full-sized avatar
🐌

Slava Egorov mraleph

🐌
View GitHub Profile
//
// This is a reproduction for the race between forking and libnotify
// intialization.
//
// # check that there are no core dumps
// $ ls /cores
// # set core limit
// $ ulimit -c unlimited
// # build the test file
// $ clang++ -o test test.cc
//var mode = arguments[0]
var mode = "foo";
function es6(a, b, c) {
return Math.max(...[a, b, c]);
}
function es5(a, b, c) {
return Math.max.apply(null, [a, b, c]);
var mode = arguments[0]
//var mode = "es5";
function es6(a, b, c) {
return Math.max(...[a, b, c]);
}
function es5(a, b, c) {
return Math.max.apply(null, [a, b, c]);
@mraleph
mraleph / x.diff
Last active November 26, 2016 19:52
--- /Users/vegorov/Desktop/main.dart.txt 2016-11-26 20:51:13.000000000 +0100
+++ bin/bench.dart 2016-11-26 20:51:31.000000000 +0100
@@ -11,36 +11,40 @@
final exerciseDepth = 5;
final resultDepth = 6;
-createNode(id, depth) {
- return {
- 'id': id,
- 'depth': depth,
@mraleph
mraleph / less_dart.patch
Last active November 15, 2016 15:14
VM patch adds `RegExp.matchAsPrefixEx` which allows to match anchored regexps at a particular position (essentially redefining what hat `^` means).
diff --git a/lib/less.dart b/lib/less.dart
index 14996ef..d947709 100644
--- a/lib/less.dart
+++ b/lib/less.dart
@@ -127,7 +127,9 @@ class Less {
Future parseLessFile(String data){
Parser parser = new Parser(_options);
+ final stopwatch = new Stopwatch()..start();
return parser.parse(data).then((Ruleset tree){
commit 4ff0340157287ca9082bca8d70e5958d96ccfd59
Author: Vyacheslav Egorov <[email protected]>
Date: Mon Aug 15 12:11:24 2016 +0200
Use library snapshot on Android instead of blobs
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 04d4bd9..735a808 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
// d8 --allow-natives-syntax --trace-opt --trace-deopt test.js
var o = { x: 0, y: 0 };
print(%HasFastProperties(o)); // => true
Object.setPrototypeOf(o, { random: 'stuff', stuff: function() { } });
print(%HasFastProperties(o)); // => true
function foo (o) {
return o.x;
}
function A() { }
A.prototype.foo = function () { };
function opt(obj) {
for (var i = 0; i < 1000000; i++) obj.foo();
}
opt(new A);
(function () {
var now = typeof performance !== 'undefined' ? performance.now.bind(performance) : Date.now;
function Accessor() {
var obj = { }
obj.x = 0;
delete obj.x;
var _a = 0;
Object.defineProperty(obj, 'a', {
@mraleph
mraleph / test.js
Last active January 7, 2016 00:03
Object.keys({a:1}) ----------------------
DebugPrint: 0x4c012f99: [JSObject]
- map = 0x5f30a2e1 [FAST_HOLEY_ELEMENTS]
- prototype = 0x24976009
{
#length: 0x24962489 <ExecutableAccessorInfo> (accessor constant)
0: 0x2492fdb1 <String[1]: a>
}
0x5f30a2e1: [Map]