Profile cover photo
Profile photo
Ryosuke Niwa
352 followers -
known as rniwa.
known as rniwa.

352 followers
About
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>
<select>
<option name="length">
<option name="namedItem">
</select>
<script>
var select = document.querySelector('select');
select.options.namedItem = 4;
alert(select.options.length + ', ' + select.options.namedItem);
</script>

Post has attachment
Photo

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

https://github.com/rniwa/js-shapiro-wilk

Post has attachment
http://artstg.icbdr.com/sites/all/files/Infographic-How-to-make-a-resume-shine.jpg

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: https://rniwa.com/2012-08-05/a-little-secret-of-me/

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

From http://lists.webkit.org/pipermail/webkit-dev/2012-July/021682.html:

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
results.

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
checkouts:
run-perf-tests --output-json-path=~/perf-test-results.json
PerformanceTests/Dromaeo/dom-traverse.html

Just like that, ~/perf-test-results.html is generated with beautiful flot
graphs summarizing the results.
Sample results page:
https://bug-92575-attachments.webkit.org/attachment.cgi?id=155123.

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: https://bugs.webkit.org/show_bug.cgi?id=92575

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.

#WebKit

REGRESSION(r122873): 15% regression on Dromaeo/dom-attr
http://trac.webkit.org/changeset/123243

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