Skip to main content
Background Image

nCine Compilation Benchmark

How long does it take to compile the nCine?

Table of Contents
Compilation Benchmarks - This article is part of a series.
Part 1: This Article

Are you curious about the time I spend to compile the nCine? 😄 In this post I’m going to show how much time is needed to compile the engine on different platforms.

Let’s start with the hardware and the software I’ve used for my tests.

Hardware and software

Xiaomi Mi Notebook Pro

Hardware

  • Intel Core i7-8550U
  • 16GB RAM, DDR4 2400 MHz, dual channel
  • Samsung PM961 NVMe SSD, 256GB
  • NVIDIA GeForce MX150, 2GB GDDR5

OS

  • Microsoft Windows 10 Professional (x64), Build 16299.248
  • Arch Linux x86_64, Linux 4.15.3

Xiaomi Mi Notebook Air 13 2016

Hardware

  • Intel Core i5-6200U
  • 8GB RAM, DDR4 2133 MHz, single channel
  • Samsung PM951 NVMe SSD, 256GB
  • NVIDIA GeForce 940MX, 2GB GDDR5

OS

  • Microsoft Windows 10 Professional (x64), Build 16299.248
  • Arch Linux x86_64, Linux 4.15.3

Chuwi Hi 10

Hardware

  • Intel Atom x5-Z8300
  • 4G RAM, DDR3 1600 MHz, single channel
  • Hynix HCG8e eMMC 5.1, 64GB

OS

  • Microsoft Windows 10 Home (x64), Build 16299.248

Compilers and tools

Windows

  • VS2017 15.5.6 (MSVC 19.12.25835)
  • CMake 3.10.2 64bit

MSYS2 and Arch Linux

  • GCC 7.3.0
  • CMake 3.10.2
  • Ninja 1.8.2

Results

The nCine version is 2018.02.r183-2d21790, compiled with GLFW, NCINE_BUILD_TESTS set to ON, NCINE_BUILD_UNIT_TESTS and NCINE_BUILD_ANDROID both set to OFF. The tests have been conducted by running the compilation process multiple times and recording the best timings.

In the Configure phase CMake is invoked in order to configure the project and generate either a Visual Studio solutions, or Makefiles, or Ninja files. In the Build phase CMake is invoked with the --build option in order to build the project. It takes advantage of multiple cores to compile only if using Ninja or MSVC with the /MP option. When using standard makefiles I have additionally provided the timings of invoking make -jN for the multicore compilation.

Tables and charts

MSVC

Mi ProMi AirChuwi
Configure14.20s12.02s
Build22.23s32.93s
Build with /MP14.87s26.48s

MSVC chart
MSVC chart

MSYS2

Mi ProMi AirChuwi
Configure Ninja8.13s12.33s40.90s
Build Ninja7.13s18.84s55.71s
Configure Make14.14s19.75s61.13s
Build Make46.80s66.12s226.53s
Build Make -j12.65s30.59s84.90s

MSYS2 chart
MSYS2 chart

Arch Linux

Mi ProMi AirChuwi
Configure Ninja1.03s1.31s
Build Ninja3.68s7.85s
Configure Make1.25s1.58s
Build Make13.56s17.31s
Build Make -j4.35s9.17s

Arch Linux chart
Arch Linux chart

Conclusions

The Mi Notebook Pro, with its Kaby Lake R featuring 4C/8T, achieves more than double the performance of the smaller Mi Notebook Air 13 when compiling with Ninja or make -j8 on all platforms. On Windows the speed-up is slightly less, but still very noticeable. The Mi Notebook Pro comes with a faster SSD and dual channel RAM which surely have affected timings. The little and fanless Chuwi Hi 10 comes last when talking about performances, but it can still configure and build the project in under 100 seconds with Ninja. 😄

Speaking about the configure phase, it strangely takes a bit more time on the Mi Notebook Pro compared to the slower Mi Notebook Air on Windows. It is also interesting to note that the Ninja generator in CMake is faster than the Makefiles one on all platforms, even if the difference on Linux is barely noticeable. Speaking about Linux, I wasn’t prepared for such a big margin when compared with Windows. Can it be a matter of Ext4 vs NTFS? Or maybe a slowdown when invoking commands through the MSYS2 console? I’m not sure of the reasons but lucky me for I usually develop on Linux and then test on the supported platforms. 😅

I hope you have found this post interesting even if it wasn’t about a development update. They will come back soon so stay tuned! 😉

Compilation Benchmarks - This article is part of a series.
Part 1: This Article