Skip to content

benedekaibas/pycot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pycot

πŸš€ Code Optimization Techniques - COT

Experiment with different optimization techniques in Python, such as using list comprehensions vs. traditional loops, optimizing function calls, or leveraging parallel processing with libraries like multiprocessing or concurrent.futures.

πŸ§ͺ Function Calls - experiment

  • File name: function_calls.py

πŸ“ Briefly Introduction to the experiment

This experiment is to compare writing code directly in the script and using a method of a class. The main focus is on the execution time between the two methods of writing python code. As you see in the result of the experiment using oop in python is a better way of writing code than just writing scripts without ordering them into classes or functions.

πŸ”Ž Displaying the result of the experiment

  • Results:
Directly scripted code method

Execution time: 0.03252672300004633 seconds

Function method

Execution time: 0.014201193996996153 seconds
Directly scripted code method

Execution time: 0.03501787199638784 seconds

Function method

Execution time: 0.014419317994907033 seconds

πŸ’» Explaining the result of the experiment

The result explains why it is a better choice to use oop method for programming in python in terms of execution time. For complex tasks it is definitely better to use oop rather than just do scripting without ordering them into functions and classes. Since in the factory the tasks are complex and programmers have to work with either large data set or complex code it is beneficial to use oop. This experiment is to show the execution time difference between the two approaches.

About

Experiment with different optimization techniques in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages