Profile cover photo
Profile photo
Ryosuke Niwa
known as rniwa.
known as rniwa.

Ryosuke's posts

I don't know why people have such a hard time understanding that I'm not interested in engaging in discussions or debates at all. The only reason I use SNS is because there are things I want to say but don't necessarily want to broadcast them to the entire world. In most cases, I'm not interested in justifying or supporting my positions or hearing opposing opinions.

One of the most important things I learned at the Google S.F. office might be how to enjoy cheese & bread.

Q: What do you get in the alert below?

<!DOCTYPE html>
<option name="length">
<option name="namedItem">
var select = document.querySelector('select');
select.options.namedItem = 4;
alert(select.options.length + ', ' + select.options.namedItem);

Post has attachment

I've ported the R's implementation of the Shapiro-Wilk (normality) test to JavaScript for you.

Post has attachment

Only if all resumes looked like the one on the right...

I don't want to be too egoistic but I want to share my life story for anyone behind in their education:

It was a fun one night project :) I think I coded the entire thing in roughly two hours.


I've added run-perf-tests the ability to aggregate results locally with
--output-json-path option.
This new feature is very useful when you want to compare performance test

Say we have two WebKit checkouts:

1. At revision X with a patch that may have regressed Dromaeo/dom-traverse.html
2. At revision X without the patch

Then execute run-perf-tests with the said option as follows in both
run-perf-tests --output-json-path=~/perf-test-results.json

Just like that, ~/perf-test-results.html is generated with beautiful flot
graphs summarizing the results.
Sample results page:

Have you been annoyed by having to manually copy & paste performance test results from Terminal? I say no more!

I'm adding run-perf-tests the ability to generate results.html with beautiful flot graphs in:

It can even aggregate results from multiple runs of run-perf-tests. So if you've ran run-perf-tests multiple times with the same JSON file path (specified by --output-json-path), results.html will contain the results from all previous runs in each graph.

Furthermore, you can aggregate results from different WebKit checkouts because the output JSON file is solely determined by --output-json-path option. For example, if you have two checkouts of WebKit with and without a patch, you can execute run-webkit-perf --output-json-path=/Users/rniwa/output.json on both checkouts and compare the results.


REGRESSION(r122873): 15% regression on Dromaeo/dom-attr

Last week, I wrote a function that runs a statement for each value of enum. To ensure this function is updated when a new value is added to the enum, I wrote a simple "for" loop over the values of enum that calls ALWAYS_INLINE function with a giant switch statement on the enum values.

I was thinking that compilers are smart enough to detect that the loop is of a fixed length, unroll the loop, and then use constant propagation to see that switch statement reduces to a single statement. It turned out that gcc doesn't, and my patch caused a 15% performance regression on some Dromaeo test (dom-attr).

My fix? Use template meta programming to unroll the loop and inline the heck out of the function.
Wait while more posts are being loaded