Speed benchmarking with cJSON from GeekDude & 32 bit vs. 64 bit
Channel: AUTOHOTKEY Gurus
Date: 2021-07-23

Previously we benchmarked Maestrith's JSON parser to a RegEx.  Then we heard about GeekDude's cJson parser.   Watch how we do the comparisons and discuss which approach is faster and why.

You can get GeekDude's cJSON parser here: https://www.the-automator.com/cJSON

TLDR: Using regular expressions can improve performance in parsing large JSON text compared to mainstream functions, and 64-bit processing is faster than 32-bit processing.

1. 00:00 💻 Using 64-bit instead of 32-bit can speed up processing, but may not be noticeable unless working with large amounts of data or slower computers.
 1.1 The speakers conducted benchmark testing with different parsers and libraries, including a pre-release C library, to compare their speed and found that using 64-bit over 32-bit can result in faster processing.
 1.2 Using more memory for certain tasks may not be noticeable unless running a large amount of data or using a slower computer.

2. 02:18 📈 Using regular expression match to parse large JSON text is faster than using a custom JSON parser function, but it ignores unnecessary data.
 2.1 The speaker compared the speed of using a custom JSON parser function versus using regular expression match to parse a large JSON text, noting that the latter method was faster but only because it ignored parts of the data that were not needed.
 2.2 Using autohotkey objects and regex, it is easy to modify regular expressions to match specific criteria.

3. 04:54 📊 Regular expressions outperform mainstream's function in parsing JSON, with an average time of 50 milliseconds compared to almost a second with the default set batch lines command.
 3.1 Parsing has pros and cons depending on the situation, with the advantage being the ability to ignore irrelevant information.
 3.2 The speaker compared the performance of parsing JSON using mainstream's function and regular expressions, and found that regular expressions were significantly faster, with an average time of 50 milliseconds compared to almost a second with the default set batch lines command.

4. 06:44 📈 Using regex can improve performance when dealing with 64-bit systems.
 4.1 Using narrow expressions can give an unfair advantage in competition, but it can also be a useful trick to achieve specific goals.
 4.2 Different libraries target different systems, but using regex avoids this issue and is faster when dealing with 64-bit systems.

5. 08:53 📈 64-bit processing is faster than 32-bit processing, but setback lines don't make a significant difference in processing time.
 5.1 Running a benchmark with default and set batch lines showed a significant decrease in average time for c json and regular expression, but running a high number of tests would take a long time.
 5.2 64-bit processing is faster than 32-bit processing, and while setback lines can improve processing time, it does not make a significant difference.

6. 11:55 💻 32-bit processing power is slower than 64-bit, causing scripts to compete for CPU time, but enabling batch lines can improve performance.
 6.1 32-bit processing power is cut by half, causing scripts to fight for CPU time, while 64-bit runs at maximum speed all the time due to more processing power.
 6.2 Running is faster than walking.
 6.3 Enabling batch lines in 32-bit can improve performance, but the impact may vary depending on the CPU, and regular expressions remain the slowest part of the process.

7. 15:06 📰 The stock market experienced a significant drop due to concerns over inflation and rising interest rates.
 7.1 The function reads and processes the entire file before starting.
 7.2 Use regular expressions if you only need to grab specific keywords from a large text, but if you need programmatic access to everything in the file, use JSON parsers to convert them into an object.

8. 16:52 💡 The conference presented innovative ideas and solutions for sustainable development.
 8.1 The speaker offers services for those who find the content difficult or lack time.


If you're new to AutoHotkey and want to learn amazing tips & tricks Check out this Amazing AutoHotkey Tutorial for Beginners: https://www.youtube.com/watch?v=hZRggm8RkhM