You ever think ChatGPT has no idea what it's talking about?
This repository contains a collection of templates that allow you to compare the execution speed of two functions: a user-defined function and an AI-generated function. The templates are provided in different programming languages and can be used to measure and compare the performance of the functions.
Some care has been taken to keep these templates as simple as possible and to only utilize standard libraries.
Currently, there are templates for these languages:
- Python (2 and 3)
- C#
- JavaScript
- Java
- Lua
- C++ (Version 11 and later)
- C
- Rust
- Ruby
- Go
- TypeScript
- GDScript
Each template includes the to measure the execution time of two separate functions. The template will also print out individual and average execution times for each function.
- Choose your language and copy the code within.
- Locate the
my_function
andai_function
sections in the code. - Replace the placeholder code with your own implementation for each function.
- Set how many times you want to run the test using the
num_runs
variable. (Default is 3). - Save and run your code.
- Analyze the results to compare the performance of the two functions.
- Tell the robit to suck it!
Feel free to use this against two versions of your own code. AI doesn't need to be involved if you don't wanna.
Feel free to add your own templates!
- Fork the repo.
- Make a new branch.
- Add your template or modify an existing one.
- Commit and push your changes to your new branch.
- Submit a pull request with the details!
Make sure any templates or changes are as simple and concise as possible.
This project is licensed under the MIT License.
This project was created as a means to play with AI and dip my toe into new languages I've never tried before. Some of these templates may have n00bish mistakes and style faux pas. Please don't stare.
Created and maintained by Eric Hamilton.