Cloud computing is one of the latest commercial ideas that has become popular and provides users with limitless access to virtual resources. Task scheduling in cloud computing refers to assigning VMs to cloud tasks. Due to service demand costs associated with the usage of software and hardware, such as bandwidth, storage, and processing, effective task scheduling and balancing the usage of VMs are essential for increasing data center efficiency and reducing energy consumption. Therefore, using an effective task scheduling algorithm that minimizes makespan and maximizes resource utilization is crucial. In many studies, different algorithms—such as Min-Min, Max-Min, and Adaptive Incremental Genetic Algorithm (AIGA)—have been developed to solve this problem, and these algorithms are used on many platforms. The goal of this study is to compare commonly used heuristic-based algorithms, which include Min-Min and Max-Min, bio-inspired algorithm AIGA, and offer an exact solution guarantee through the Exhaustive Learning Optimization Algorithm (ELOA). With this aim, the instance types of Amazon EC2 have been used to implement virtual machines with various computing capacities on CloudSim. The results show that Min-Min and Max-Min algorithms provide computationally efficient feasible solutions, and AIGA also provides feasible solutions with adaptive and efficient processes. Finally, ELOA provides an optimal solution that minimizes makespan. This makes Min-Min, Max-Min, and AIGA suitable for large-scale task scheduling in cloud computing, while ELOA is a great choice for small-scale problems.