Skip to content

Instantly share code, notes, and snippets.

View gskachkov's full-sized avatar

Oleksander Skachkov gskachkov

  • Itera Consulting
  • Ukraine, Kiev
View GitHub Profile
VMs tested:
"before" at /Users/Developer/Projects/Webkit2/WebKitBuild/before_patch/Release/jsc
"after" at /Users/Developer/Projects/Webkit2/WebKitBuild/es6_functions/Release/jsc
Collected 4 samples per benchmark/VM, with 4 VM invocations per benchmark. Ran 2 benchmark
iterations, and measured the total time of those iterations, for each sample. Emitted a call to
gc() between sample measurements. Used 4 benchmark iterations per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.
MacBook-Pro-Skachkov-2:Webkit2 Developer$ Tools/Scripts/run-jsc-benchmarks before:/Users/Developer/Projects/Webkit2/WebKitBuild/before_patch/Release/jsc after:/Users/Developer/Projects/Webkit2/WebKitBuild/es6_functions/Release/jsc --octane --benchmark="jquery|closure" --outer 10
VMs tested:
"before" at /Users/Developer/Projects/Webkit2/WebKitBuild/before_patch/Release/jsc
"after" at /Users/Developer/Projects/Webkit2/WebKitBuild/es6_functions/Release/jsc
Collected 10 samples per benchmark/VM, with 10 VM invocations per benchmark. Emitted a call to
gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.
#1
VMs tested:
"before" at /Users/Developer/Projects/Webkit2/WebKitBuild/before_patch/Release/jsc
"after" at /Users/Developer/Projects/Webkit2/WebKitBuild/es6_functions/Release/jsc
Collected 10 samples per benchmark/VM, with 10 VM invocations per benchmark. Emitted a call to
gc() between sample measurements. Used 1 benchmark iteration per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.
@gskachkov
gskachkov / Modified test with arrow functions
Last active August 1, 2016 07:57
Performance test of the jsc with POC, without POC, and without Arrow function
VMs tested:
"without_poc" at /Users/Developer/Projects/Webkit2/WebKitBuild/without_poc/Release/jsc
"poc_af" at /Users/Developer/Projects/Webkit2/WebKitBuild/poc_af/Release/jsc
Collected 4 samples per benchmark/VM, with 4 VM invocations per benchmark. Ran 10 benchmark
iterations, and measured the total time of those iterations, for each sample. Emitted a call to
gc() between sample measurements. Used 50 benchmark iterations per VM invocation for warm-up. Used
the jsc-specific preciseTime() function to get microsecond-level timing. Reporting benchmark
execution times with 95% confidence intervals in milliseconds.
@gskachkov
gskachkov / Promise.js
Created February 27, 2017 11:00
Example of Promise
var promise = new Promise(function(resolve, reject) { … } );
@gskachkov
gskachkov / ResolvePromise.js
Last active February 27, 2017 11:08
Example of resolve promise
// Create promise
var promise = new Promise(function (resolve) {
//Resolve promise in 50ms with string 'success'
setTimeout(function () { resolve('success'); }, 50);
});
// Handle successful resolve of promise
promise.then(function (result) {
console.log(result); // Print: success
});
@gskachkov
gskachkov / RejectPromise.js
Created February 27, 2017 11:12
Example of Reject Promise
var bar = new Promise(function (resolve) {
setTimeout(function () { reject('error'); }, 50);
});
bar.then(function() {}, function (reject) {
console.log('reject:', reject);
}); // reject:error
bar.catch(function (reject) {
console.log('catch:', reject);
@gskachkov
gskachkov / ChainOfPromises.js
Last active March 6, 2017 19:50
Example of chain of promises
var getPromise = (value, delay) => {
return new Promise(resolve => {
setTimeout(() => resolve(value), delay);
});
};
var promise = getPromise('start value', 150);
promise
.then(result => {
@gskachkov
gskachkov / Promise.resolve.js
Last active July 20, 2017 20:40
Example of Promise.resolve function
var promiseImmediate = Promise.resolve('Immediate value');
promiseImmediate.then(result => console.log('promiseImmediate:', result));
// 'promiseImmediate: Immediate value' will visible imidiatly
var resolver = {};
var promise = new Promise(resolve => { resolver.resolve = resolve; });
var promiseDefferred = Promise.resolve(promise);
promiseDefferred.then(result => console.log('promiseDefferred:', result));
// No any text
@gskachkov
gskachkov / Promise.reject.js
Last active March 6, 2017 14:20
Example of usage Promise.reject
var promiseImmediate = Promise.reject('Immediate value');
promiseImmediate.then(
result => console.log('promiseImmediate success:', result),
error => console.log('promiseImmediate fail:', error)
); // promiseImmediate fail: Immediate value
promiseImmediate.catch(error => console.log('promiseImmediate catch:', error));
var resolver = {};
var promise = new Promise((resolve, reject) => { resolver.reject = reject; });