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.

Pixel Tracking in PHP

Updated 16th August 2022

When creating email campaigns, it’s important to know how many recipients actually opened your email. This information can help you determine if your efforts are working or if it’s time to change your strategy. Most mail champaign tools such as Mailchimp and SendInBlue use a technique called Pixel Tracking. In this post, you will learn

IPtables – How to block and unblock IP Addresses in Linux

Updated 14th December 2023

Not long ago, I noticed some strange activity on a server I manage. The server, running Ubuntu 22.04, was receiving high volumes of traffic from a single IP Address. After some investigation, I decided the activity resembled that of web scrapping, so I decided to block the IP Address. Iptables or ufw I hear you

What is PHP?

Updated 1st August 2022

PHP (PHP: Hypertext Preprocessor) is an open-source, general-purpose, and server-side scripting language widely used in web development. PHP is used to manage databases, dynamic content, session tracking, and much more. Let’s answer the question “What is PHP?”. What is PHP used for? Since its first release in 1995, PHP has been seen used in many