Skip to content

Instantly share code, notes, and snippets.

@apb2006
Created January 19, 2012 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apb2006/1643724 to your computer and use it in GitHub Desktop.
Save apb2006/1643724 to your computer and use it in GitHub Desktop.
basex 7.02 performance
(: 100ms :)
import module namespace app="/apb/bxnfactbook/0.1" ;
declare namespace functx="http://www.functx.com";
declare function local:foo(){
let $a:=app:entity("city")
let $schema:=$app:schema/schema/db/entity[@name="city"]
let $sorted:=app:sequence-sort($a,"name",1,"string")
let $table:=app:sequence-to-table3($sorted,$schema)
return $sorted
};
count(local:foo())
----------------------
(: 2929 :)
import module namespace app="/apb/bxnfactbook/0.1" ;
declare namespace functx="http://www.functx.com";
declare function local:foo(){
let $a:=app:entity("city")
let $schema:=$app:schema/schema/db/entity[@name="city"]
let $sorted:=app:sequence-sort($a,"name",1,"string")
let $table:=app:sequence-to-table3($sorted,$schema)
return $table
};
count(local:foo())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment