What are some good/common profiling tests for scripting languages?

Started by
4 comments, last by Lexxisriennnl 3 years ago

Hi everyone, I've been working on a custom scripting language in my free time to test out an idea I had and I'm wondering how I could test its performance/speed. Is there a set of common tasks/scenarios that people use to test or compare languages. I'm guessing that a good starting point would be something like timing sorting an array of 10000 randomly generated items, counting to a billion, Fibonacci sequence, stuff like that.

None

Advertisement

The best choice of benchmarks to measure performance is real applications and use-cases. There aren't any common standardized test suites out there which languages can compete against because all languages are created with a special use-case in mind and so behave different on different problems.

My suggestion is to do what you want to test out and try to modify the code needed for it for different aspects and see how it behaves. Run a full CPU benchmark (Visual Studio for example can do that) and see where your bottlenecks are and if there is something to optimize, then optimize and test again.

Repeat this process up to the point when you get equal benchmarks on all tested cases and you're done

There are plenty of benchmarks around; just google for “programming language benchmarks”. The problem with any benchmark is that it usually not be representative of real code; having a suite of lots of different benchmarks mitigates this problem but does not eliminate it.

If you are making a scripting language for your game or game engine, you should have a precise idea of what are you going to do with it, allowing very realistic tests (production quality scripts, maybe with exaggerated amounts of data or complications). If you do not have a precise idea of the scripts you are going to write, you are in the middle of language development and benchmarks are premature.

Omae Wa Mou Shindeiru

I advise trying some benchmarks as well, even if you can face some extra issues to solve, cause I can't imagine another way out here - it's impossible to apply any of the A/B tests, unfortunately.
Just think over what you are going to test and try it (some piece of it at least). In case any alterations in code are needed you'll notice and can fix it. Afterwards, one more test may be required.

This topic is closed to new replies.

Advertisement