ScratchData LogoScratchData
Back to ChromeCat_test's profile

Timing blocks for micro-optimisation

CHChromeCat_test•Created August 29, 2021
Timing blocks for micro-optimisation
8
5
101 views
View on Scratch

Instructions

[drag and drop the sprite in the project into your backpack and then you can copy it to your project] I created two blocks "start timing <label>" and "end timing <label>" which you can use to wrap parts of your code which you want to time. The timing list contains: - label - "days since 2000" at last call - total number of calls - total time elapsed

Description

I've included an example timing all the math blocks to show how to use it. I also use it alot in this project: https://scratch.mit.edu/projects/563142758/ This can be useful when you want to micro optimise parts of your code and need to know the percentage breakdown of time consumed by each part of your project or if you want to compare two versions of the same block.

Project Details

Project ID564755510
CreatedAugust 29, 2021
Last ModifiedMay 11, 2024
SharedAugust 29, 2021
Visibilityvisible
CommentsAllowed