arturo-lang / arturo

Simple, expressive & portable programming language for efficient scripting
http://arturo-lang.io
MIT License
685 stars 31 forks source link

[VM/values/comparison] Should we convert `!=` into a template? #1162

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

[VM/values/comparison] Should we convert != into a template? Does it make sense performance/binarysize-wise?

https://github.com/arturo-lang/arturo/blob/269a723e23971f7c5ba310f6c3539852a6f016e3/src/vm/values/comparison.nim#L477

    x > y or x == y

# TODO(VM/values/comparison) Should we convert `!=` into a template?
#  Does it make sense performance/binarysize-wise?
#  labels: enhancement, performance, benchmark, open-discussion

proc `!=`*(x: Value, y: Value): bool {.inline.}=
    not (x == y)

a04436c5b84a8e93d86520eaba576b0f5e2e90f1

RickBarretto commented 1 year ago

Should we convert != into a template?

It would reduce a lot bugs IMO, since you'll be just reusing code. But I don't know about the performance...

stale[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.