{"id":18885470,"url":"https://github.com/dagit/emu-test","last_synced_at":"2026-02-23T07:30:17.742Z","repository":{"id":66389397,"uuid":"259157657","full_name":"dagit/emu-test","owner":"dagit","description":"timing different ways to implement a cycle accurate emulator","archived":false,"fork":false,"pushed_at":"2020-05-23T06:40:26.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T04:42:00.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/dagit.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":"2020-04-26T23:45:34.000Z","updated_at":"2020-05-23T06:40:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"a838ab9c-21e1-4ff7-a890-e46a9eba8c8f","html_url":"https://github.com/dagit/emu-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Femu-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Femu-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Femu-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dagit%2Femu-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dagit","download_url":"https://codeload.github.com/dagit/emu-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239858867,"owners_count":19708856,"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","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":"2024-11-08T07:19:10.865Z","updated_at":"2026-02-23T07:30:17.655Z","avatar_url":"https://github.com/dagit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# emu-test\ntiming different ways to implement a cycle accurate emulator\n\nThis is based on doing some explorations inspired by this post: https://byuu.net/design/cooperative-threading\n\n* The `null` variant doesn't attempt to do anything other than cycle counting.\n* The `enum` variant uses a very simple encoding of the state machine as integer values. It's a pain to program in and only exists to have something to compare against.\n* The `genawaiter` variant uses the genawaiter library to achieve a coroutine sort of thing. That code is doing the right thing in my test case, but I'm a little skeptical of my `wait` function, see `local_join`.\n* The `tokio` variant uses tokio in what I think is the most straight forward way?\n* The `async-std` variant is just like the tokio variant but using `async-std` instead of tokio.\n\nNot shown in this repo is a simple example in C that I created using byuu's `libco` library. That library only provides the task switch so I also needed to make a simple scheduler. That version can do 5 million instructions in 1second on my machine. For comparison, `genawaiter` is 4s for the same workload, and `tokio` is about 12 seconds.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Femu-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdagit%2Femu-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdagit%2Femu-test/lists"}