forked from Mirror/wren
I've got some ideas on how to tweak the embedding API, but I want to see what performance impact they have first, so this adds a little benchmark that just calls a foreign method a ton of times.
15 lines
303 B
Plaintext
15 lines
303 B
Plaintext
class Value {
|
|
foreign static value=(value)
|
|
foreign static value
|
|
}
|
|
|
|
Value.value = ["list", "of", "strings"]
|
|
|
|
// Do some stuff to trigger a GC (at least when GC stress testing enabled).
|
|
var s = "string"
|
|
for (i in 1...10) {
|
|
s = s + " more"
|
|
}
|
|
|
|
System.print(Value.value) // expect: [list, of, strings]
|