This story is all about code performance, we can see how do we write the code in a traditional way or when we have a short deadline on our head and how to optimize that code to run fast and make it more readable to other fellow developers.

_“Any fool can write code that a computer can understand. Good programmers write code that humans can understand” — _Martin Fowler

That’s great. But you said, “optimize that code” so my question is: “what is code optimization?”

Image for post

Code Optimization

Code optimization is, any method of code modification to improve code quality and efficiency. A program may be optimized so that it becomes a smaller in size, consumes less memory, executes more rapidly.

I believe we are pretty much clear about code optimization right? Yup!

Let’s take a problem and start building a solution for that: “Write a function to determine whether the string is a palindrome or not?”

Palindromes

A palindrome is a word, number, phrase, or other sequences of character which reads the same backward as forward, such as madam, racecar.

Palindrome family

All the names are palindrome

Let’s start coding!

#javascript #computer-science #code-optimization #algorithms #programming

Optimize your code and it’ll execute up to 55% faster ✈️
2.10 GEEK