Skip to content

A collection of scripts to compare the speed of two given functions

License

Notifications You must be signed in to change notification settings

eric-hamilton/ai-time-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Time Checker

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.

Templates

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.

Usage

  1. Choose your language and copy the code within.
  2. Locate the my_function and ai_function sections in the code.
  3. Replace the placeholder code with your own implementation for each function.
  4. Set how many times you want to run the test using the num_runs variable. (Default is 3).
  5. Save and run your code.
  6. Analyze the results to compare the performance of the two functions.
  7. 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.

Contributing

Feel free to add your own templates!

  1. Fork the repo.
  2. Make a new branch.
  3. Add your template or modify an existing one.
  4. Commit and push your changes to your new branch.
  5. Submit a pull request with the details!

Make sure any templates or changes are as simple and concise as possible.

License

This project is licensed under the MIT License.

Disclaimer

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.

Credits

Created and maintained by Eric Hamilton.

About

A collection of scripts to compare the speed of two given functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published