Created
November 27, 2023 15:50
-
-
Save jonathanhecl/6e245bfdcb0d77bed0ae3068668f8c08 to your computer and use it in GitHub Desktop.
GDScript vs C#
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
GDScript: | |
func _ready() -> void: | |
var begin = OS.get_ticks_usec() | |
var sum = 0; | |
for i in range(0, 100): | |
sum += 1 | |
print(sum) | |
var end = OS.get_ticks_usec() | |
print(end - begin) | |
C#: | |
public override void _Ready() | |
{ | |
var begin = OS.GetTicksUsec(); | |
var sum = 0; | |
for (var i = 0; i < 100; i++) | |
sum += 1; | |
GD.Print(sum); | |
var end = OS.GetTicksUsec(); | |
GD.Print($"Elapsed> {end - begin}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment