Skip to content

Instantly share code, notes, and snippets.

@ZeWaka
Created October 12, 2020 02:57
Show Gist options
  • Save ZeWaka/c65e395e779f7fc99033a2bdc9cc573a to your computer and use it in GitHub Desktop.
Save ZeWaka/c65e395e779f7fc99033a2bdc9cc573a to your computer and use it in GitHub Desktop.
@MoMMIv2#3484 ```
var/list/obj/a/L = list()
/obj/a
var/foo = 1
New()
src.foo = rand()
/proc/main()
set background = 1
var/t1
var/t2
for(var/x in 1 to 1)
var/obj/a/bar = new
L += bar
var/const/loops = 8000000
var/time1 = world.timeofday
for(var/i in 1 to loops)
non()
t1 = world.timeofday-time1
world.log << "non: [t1]"
var/time2 = world.timeofday
for(var/i in 1 to loops)
question()
t2 = world.timeofday-time2
world.log << "question: [t2]"
world.log << "t1/t2 = [t1/t2]"
/proc/non()
for(var/obj/a/A as() in L)
if (A && A.foo)
return
/proc/question()
for(var/obj/a/A as() in L)
if (A?.foo)
return
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment