After writing my post I was excited to use WASM in a real application I was developing at my internship at GDK Software. I was not developing applications with real heavy calculations so there wasn’t a proper use for WASM, but that did not slow me down in using this new technology.
Converting a MySQL database to an MSSQL database
One application I was working on was a Node.Js script that converts a MySQL database to an MSSQL database. Because MySQL can use an unsigned int as a datatype for identifier it was not possible to just straight up copy this field. For this purpose, I added a new column to the tables in the MSSQL database that would hold the original identifier from the MySQL database.
Every time I needed a foreign key constraint I would look up the new identifier using the original identifier. This meant a constant flow of select statements to the MSSQL database.
Creating a map doesn’t require any additional libraries to be imported.
In C++ no additional libraries are needed as well. Because map is included in the standard library.
So before implementing any map in this conversion, it took the application 324888.4994ms or 325 seconds to convert the database.
So implementing a map, in general, did improve my overall performance of the application. But did WASM improve the application… Well, it did with about 1.5 seconds. Which isn’t much of an improvement.