BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
694 stars 265 forks source link

XQuery: Faster EBV checks #2326

Closed ChristianGruen closed 3 months ago

ChristianGruen commented 3 months ago

In various cases, EBV checks can be made faster if the tested result is not materialized. Examples:

let $count := 1 to 10000000000
return (
  boolean(concat($count))
  boolean(string-join($count))
  boolean(codepoints-to-string(($count) ! 0x41))
)

Other expressions that could be optimized: