WSL vs Dual Boot speed test

By Dillon Smart · · · 0 Comments

In this experiment, I will be using WSL2 running Ubuntu 20.04 and Ubuntu 20.04 dual-booted on the same Dell XPS. Is there a noticeable difference? Follow along for the results of the WSL vs Dual Boot speed test.

If you are like me and use different development environments a lot, you may find the results of the tests interesting.

PHP Speed Test

In the PHP Speed Test, I will be using PHP 8.1. which is the latest version of PHP as of writing this post. I will be cloning a repository and installing the dependencies with Composer 2 and comparing the results.

PHP Composer CLI Output

Composer speed test on WSL vs Dual-boot

WSL downloaded all dependencies in 6.61 seconds. Dual-boot Ubuntu downloaded all dependencies in 4.38 seconds.

The difference here may not seem that big, however, for large projects with many dependencies the difference in time can become more noticeable.

NPM Speed Test

In the NPM Speed Test, I will be using NPM 8.9.0 (The latest stable release at the time of writing this). I will be installing the Angular CLI and comparing the results.

Angular CLI Output

On WSL, the Angular CLI was installed in 7.21 seconds. Dual-boot Ubuntu downloaded the Angular CLI in 3.28 seconds.

This is a far bigger difference in time and can become extremely noticeable when installing packages using NPM.

Conclusion

WSL is slower, that’s undeniable. However, for many developers, running WSL is a better choice than a Virtual Machine. Staying within the Windows environment is a must in some organizations, and WSL provides a great, convenient way to run Linux applications and command-line tools natively on Windows. It will just take a little longer to get stuff done.

Learn how to set up a LAMP stack on WSL

AngularComposerPHPUbuntuWindows Subsystem for Linux

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Start WSL2 services on Windows startup

Updated 16th August 2022

In some circumstances, you may want to automatically start your WSL2 (Windows Subsystem for Linux) services on Windows startup such as Apache2, Nginx, and MySQL. Follow along below to learn how to start your services when you boot your machine. Create a startup script The first step is to create a startup script. This is

What is the Lexing stage in PHP

Updated 10th December 2023

Lexing is a phase the PHP interpreter undergoes while interpreting the source code written. Lexing, is the first of four overall steps performed by the PHP interpreter. Steps in the PHP Interpreter The PHP interpreter undergoes a total of four steps before executing the code written. What is Lexing in PHP Lexical analysis, also known

PHP Numeric Literal Separator

Updated 14th December 2023

First introduced in PHP 7.4, the Numeric Literal Separator in PHP makes large integers within your code easy to read. Naturally, we find it easier to read number which are grouped, for example, 1,650,000. Using the numeric literal separator in PHP Since PHP 7.4, we can now use numbers like this: Adding an underscore between