comparison

Sponsored links
Golang

Golang Use a pointer receiver to define a function for a struct

Do you recognize that there are two ways to define a method for a struct? func (m StructName) FuncName(){ // do somethin...
Golang

Golang Is Compiling Regex In Loop Really Expensive?

A regex is a useful feature to check whether a string contains a special format. If we have many formats, we might want ...
Python

Python Check performance by using timeit

We should somehow check the performance if we want to compare some implementations to know a faster one. It can be done ...
Golang

Golang Which way is the best to declare array/slice

Have you ever considered the best way to declare an array/slice in Golang? Golang offers several ways to declare it. It'...
Python

Python Find the fastest way to access a property for performance

Which structure is the fastest way to access a property? Let's compare the different structures and choose the fastest one for performance tuning.
JavaScript/TypeScript

8 ways to remove duplicates from Array in TypeScript

This page shows 8 ways to remove duplicates from an array. It also compares the performance to be useful to decide which one to use for your case. It also covers the case where the element is object.
JavaScript/TypeScript

String concat in JavaScript Performance Comparison

JavaScript offers several ways to concatenate strings. Let's learn how to concatenate strings and which one is the best ...
JavaScript/TypeScript

Is Map object faster than if-else and switch?

Using map object is useful to replace switch-case or if-else that can easily be long lines. It improves the readability but how about the performance? Is it faster than switch-case and if-else? Let's compare the difference!
JavaScript/TypeScript

Best way to implement utility function Top-level vs Static vs Namespace

There are several ways to offer utility function which is used by variety classes. Have you ever considered which way is...
JavaScript/TypeScript

Difference between for, while, forEach, for-in and for-of

A lot of languages support several ways for loop logic. Typescript supports following ways for example. whileforfor in f...
Sponsored links