Sable / dls18-ostrich

Experimental results for the second version of ostrich in the context of ubiquitous Javascript
3 stars 2 forks source link

WebAssembly and JavaScript Challenge: Numerical program performance using modern browser technologies and devices

Devices

name cpu memory OS GCC Emscripten Report Data
DESKTOPS & LAPTOPS
mbp-2013 Intel(R) Core(TM) i5 @ 2.4 GHz 8 GB 1600 MHz DDR3 macOS High Sierra 10.13.1 llvm-gcc 4.2.1 1.37.22 report mbp2013.csv
ubuntu-deer Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz 16 GB Ubuntu 16.04 xenial gcc 5.4.0 1.37.22 report ubuntu-deer.csv
windows-bison Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz 16 GB Windows 10 Enterprise gcc 6.4.0 cywig 1.37.22 report windows-bison.csv
S. B. Computers
raspberry-pi-3 1.2 GHZ quad-core ARM Cortex A53 (ARMv8 Instruction Set) 1 GB Linux Raspberry Pi 4.9.35-v7 gcc 4.9.2 - 10 1.37.22 report raspberry-pi-3.csv
TABLETS
ipad-pro 2.36 GHz hexa-core Apple Fusion (3× Hurricane + 3× Zephyr) 4GB OS 11.0.3 (15A432) - 1.37.22 report ipad-pro.csv
samsung-tab-s3 2.15GHz - 1.6Ghz Quad Core Processor 4GB android 8.0.0 - 1.37.22 report samsung-tab-s3.csv
SMART PHONES
sumsung8 Octa-core (2.3GHz Quad + 1.7GHz Quad), 64 bit, 10nm processor 4GB android 8.0.0 - 1.37.22 report sumsung8.csv
pixel2 Qualcomm MSM8998 Snapdragon 835, Octa-core (4x2.35 GHz Kryo & 4x1.9 GHz Kryo) 4 GB android 8.0.0 - 1.37.22 report pixel2.csv
iphone8 2.36 GHz hexa-core Apple Fusion (3× Hurricane + 3× Zephyr) 4GB OS 11.0.3 - 1.37.22 report iphone10.csv

Experiments

RQ1 Old versus New JavaScript Engines

Conclusion: The overall performance of JavaScript against native C versions remained within a factor of 2. The current Firefox browser has presented an overall improvement, compared to the older Firefox version. The current Chrome browser, however, has presented a decrease in overall performance compared to the older Chrome version.

Figure 2. JavaScript Performance of the MacBook Pro 2013 laptop against native C, using the old and current versions for Chrome and Firefox Figure 2. JavaScript Performance of The MacBook Pro 2013 against native C

Figure 3. JavaScript Performance of Ubuntu Workstation against native C, using the old and current versions for Chrome and Firefox Figure 3. JavaScript Performance of Ubuntu Workstation against native C

RQ2 JavaScript versus WebAssembly

Conclusion: All browsers demonstrate significant performance improvements for WebAssembly, in the range of 2x speedups over the same browser’s JavaScript engine. Furthermore, WebAssembly achieves an overall performance close to 1 against native C, achieving an even greater performance for Firefox57 in the ubuntu-deer platform.

Figure 4. WebAssembly performance relative to C on the MacBookPro 2013. Figure 4.

Figure 5. WebAssembly performance relative to C on the different platforms. Figure 5.

Figure 6. WebAssembly performance relative to JavaScript on the different platforms. Figure 6.

RQ3 Portable versus Vendor-specific Browsers

Conclusion: In general the performance of the proprietary browsers is close for all the mobile and tablet devices, while presenting some differences in the windows-bison workstation and the mbp2013 laptop, where the proprietary browsers are performing worse overall. Therefore no clear trend of vendors taking advantage of their hardware architecture knowledge has been found.

Figure 7. Performance of browsers relative to proprietary respective browsers. Figure 7.

RQ4 Server-side Node.js versus Client-side Browsers

Conclusion: Node.js was overall slower than native C code for both JavaScript and WebAssembly, although the best WebAssembly gave reasonable performance of 0.8 the speed of native C. Server-side Node.js matched the best browser performance for both JavaScript and WebAssembly for all the devices, except for the ubuntu-deer device.

Figure 9: Performance of Node.js in different workstations relative to C. Figure 9. Table 6: Browser speedup performance relative to their respective WebAssembly and JavaScript Node.js versions for each device.

Device Chromium 63 JS Chromium 63 -wasm-c Firefox-57 -js Firefox57 -wasm-c Safari11-js Safari- wasm-c Microsoft -Edge -js Microsoft -Edge -Wasm-c Chromium56 -js
mbp2013 1 1 0.9 0.9 1.2 1.4 - - -
windows-bison 1 1.1 0.9 1 - - 1.5 1.1 -
ubuntu-deer 0.6 0.5 0.4 0.4 - - - - -
raspberry-pi - - - - - - - - 1.1

RQ5 Best Performers

Conclusion: The best overall browser performance was by the Firefox 57 browser, the order of device performance has the two workstations first, surprisingly followed by the iPhone 10, the rest of the order is: MacBook Pro 2013 laptop, iPad Pro, Samsung S8, Pixel 2, Samsung Tab S3 and lastly, Raspberry Pi Model B.

Table 7: Device performance across environments using the native C raspberry pi implementation as baseline for geometric means. Table 7.

Raw Timings

iPhone 10

Figure 1: Timing in seconds for the Apple iPhone 10 time-iPhone10

Samsung S8

Figure 2: Timing in seconds for the Samsung S8 time-samsungS8

Pixel 2

Figure 3: Timing in seconds for the Google Pixel 2 time-pixel2

Samsung Tab S3

Figure 4: Timing in seconds for the Samsung Tab S3 time-samsung-tab-s3

iPad Pro

Figure 5: Timing in seconds for the iPad Pro time-ipad-pro

MacBook Pro 2013

Figure 6: Timing in seconds for the MacBook Pro 2013 time-mbp2013

Ubuntu Deer

Figure 7: Timing in seconds for the ubuntu-deer time-ubuntu-deer

Windows Bison

Figure 8: Timing in seconds for the windows-bison time-windows-bison