{"id":24511074,"url":"https://github.com/libraries/rare_duktape","last_synced_at":"2025-08-25T23:05:29.950Z","repository":{"id":91860552,"uuid":"198822171","full_name":"libraries/rare_duktape","owner":"libraries","description":"Tests for c / duktape on RISCV VM","archived":false,"fork":false,"pushed_at":"2019-07-30T02:41:53.000Z","size":2862,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T09:43:13.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-25T11:54:07.000Z","updated_at":"2019-10-23T13:57:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e7d3ca4-d5f8-43ce-9c5c-ff5bbdff7276","html_url":"https://github.com/libraries/rare_duktape","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/libraries/rare_duktape","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Frare_duktape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Frare_duktape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Frare_duktape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Frare_duktape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libraries","download_url":"https://codeload.github.com/libraries/rare_duktape/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libraries%2Frare_duktape/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272144649,"owners_count":24881141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T00:36:14.404Z","updated_at":"2025-08-25T23:05:29.771Z","avatar_url":"https://github.com/libraries.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rare Duktape\n\nTests for c / duktape on RISCV VM\n\n```\n$ git clone https://github.com/mohanson/rare_duktape\n$ cd rare_duktape\n$ make riscv/duktape riscv/fib\n\n$ cargo run --release --example fib_c\n$ cargo run --release --example fib_js\n$ cargo run --release --example secp256k1_bench\n$ cargo run --release --example matching_engine\n$ cargo run --release --example calc\n```\n\n# Test Result\n\nTest fibonacci by C and JS, on Asm machine and native rust interpreter:\n\n```\n# C\nUse asm machine, 10000 times\nFirst run result: exit=0 ret=[0, 0, 0, 0, 0, 0, 0, 55] cycles=10431\nRun 10000 in 5s, TPS=2000\n\nUse native rust, 10000 times\nFirst run result: exit=0 ret=[0, 0, 0, 0, 0, 0, 0, 55] cycles=10431\nRun 10000 in 4s, TPS=2500\n\n# JavaScript\nUse asm machine, 100 times\nFirst run result: exit=0 ret=[0, 0, 0, 0, 0, 0, 0, 55] cycles=8064265\nRun 100 in 20s, TPS=5\n\nUse native rust, 100 times\nFirst run result: exit=0 ret=[0, 0, 0, 0, 0, 0, 0, 55] cycles=8064265\nRun 100 in 32s, TPS=3\n```\n\nTest secp256k1 on Asm machine and native rust interpreter, source code are taken from [here](https://github.com/nervosnetwork/ckb-vm-test-suite):\n\n```\nUse asm machine, 1000 times\nFirst run result: exit=0 ret=[] cycles=1330941\nRun 1000 in 5s, TPS=200\n\nUse native rust, 1000 times\nFirst run result: exit=0 ret=[] cycles=1330941\nRun 1000 in 54s, TPS=18\n```\n\nTest a simple matching engine on Asm machine and native rust interpreter, source code are taken from [here](https://github.com/mohanson/MatchingEngine)\n\n```\nUse asm machine, 1000 times\nFirst run result: exit=0 ret=[] cycles=241181\nRun 1000 in 7s, TPS=142\n\nUse native rust, 1000 times\nFirst run result: exit=0 ret=[] cycles=241181\nRun 1000 in 9s, TPS=111\n```\n\n# Clean\n\n```\n$ docker rmi nervos/ckb-riscv-gnu-toolchain\n$ rm -rf $(PROJECT_DIR)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibraries%2Frare_duktape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibraries%2Frare_duktape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibraries%2Frare_duktape/lists"}