Created
November 27, 2019 17:02
-
-
Save RichardEllicott/ee09d45cea8fd63a720b55c5af783f50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func _ready(): | |
print("start tests...") | |
var dispose # i put this here, to prevent some clever compiler from realising these values are not used | |
var start_time = OS.get_ticks_msec() | |
for i in range(1,1000000): | |
dispose = 15629/i | |
var total_time = OS.get_ticks_msec() - start_time | |
print('interger division time: ', total_time) | |
start_time = OS.get_ticks_msec() | |
for i in range(1,1000000): | |
dispose = 15629.0/i | |
total_time = OS.get_ticks_msec() - start_time | |
print('float division time:: ', total_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment