What’s Important About Runtime?

Daniel Glover
2 min readMar 13, 2019

First & foremost: Explaining Run Time

“Run time is primarily used in software development to isolate and define certain phases of the program/software in development. Run time starts when the program is loaded within the memory along with its required framework, components and libraries. This is generally done by the compiler or a loader application found within software development utilities and languages. The operating system assigns required memory, processor and I/O resources to all the programs, from the start to the end of its run time.” quoted from Techopedia (link below)

I found it pretty rare to find an explanation to runtime that I could wrap my head around. In the quote from Techopedia, it explains how different features of a programming language can effect the runtime of our program.

Say we were to build a web-app with Ruby On Rails, we’d be able to get our project off the ground pretty fast with the help of the framework’s extensive libraries. We get given so much with Ruby; prefabricated methods and modules like ActiveSupport & ActiveRecord, or even the puts method. All of this ‘stuff’ is being executed at runtime, and at the expense of runtime too.

Why is Ruby’s runtime slower than other programming languages?

Interpreted programming languages like Ruby trade off execution times for development speed, they — Interpreted Programming Languages — can be run without previously compiling our code into machine code. Meaning it’s translated into machine code at runtime, thus increasing our runtime. Compiled Languages tend to be faster because they’re compiled into machine code at compile time, making them — usually — faster than interpreted languages (translation to machine code happening in compile time instead of runtime). However, there are advancements in computer hardware & software that are being made to narrow that gap.

Why and when is it important to consider runtime?

When building an application, it’s important to consider development cost. Using frameworks like Rails means that we can get our project up and running in efficient time . However, when running big projects, especially video games or projects dealing with mega-sized data or math-centric data it’s optimal to pick a compiled language over the interpreted. Runtime is vital in these environments, and the accuracy of our code is really important.

Essentially, we can use both types of programming language for the same purpose. However each type is more effective than the other in different areas. As a developer, it’s important that we consider this & try to match our programming language with the task or project we wish to fulfill/create.

Food For Thought?

//Further away from native code? The degrees of separation to native code would mean that the runtime would increase for that reason too. There are a lot of things happening automatically that we may take for granted when we code. Garbage Collection, Data Leaks & Compiling, to name a few.//

--

--