Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更多需要行的优化 #55

Open
HuntingBot opened this issue Apr 15, 2021 · 6 comments
Open

更多需要行的优化 #55

HuntingBot opened this issue Apr 15, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@HuntingBot
Copy link

慢也没事,总比把同一个分支运行很多次好很多。(当然应该做成可选的。)
每搜一行就在散列表中查询它的转子,如果没有就继续搜索并把它的转子记录到散列表中,如果有就回溯。
@AlephAlpha

@AlephAlpha
Copy link
Owner

等有时间我就试试写一个按行搜索的工具……

或者试试能不能把qfind之类的改成网页版……但我看不懂C++……

@HuntingBot
Copy link
Author

HuntingBot commented Apr 15, 2021

@AlephAlpha 按行搜索就不像 rlifesrc 这样可以自由定义搜索了。

你可以在假设细胞的过程中,把它在所有gen的状态记录下来——除非它是定子(定子统一为[0, 0, 0... 0]。)然后换一行的时候就散列表比对。

@HuntingBot
Copy link
Author

等有时间我就试试写一个按行搜索的工具……

或者试试能不能把qfind之类的改成网页版……但我看不懂C++……

我来改。你这个是怎么弄到网页上去的?

@AlephAlpha AlephAlpha added the enhancement New feature or request label Apr 15, 2021
@AlephAlpha
Copy link
Owner

AlephAlpha commented Apr 15, 2021

WebAssembly。

不过 Rust 编译成 WebAssembly 比较方便,有全套的工具。借助 wasm-bindgenYew 这样的工具,我不用写 JavaScript 就能在网页上调用 WebAssembly,甚至网页本身也可以用 Rust 来写。

至于 C++……我不懂 C++……

看了一下,好像 C/C++ 那边也有自己的工具,叫做 Emscripten这里有个教程。这周末我试一试。

@AlephAlpha
Copy link
Owner

AlephAlpha commented Apr 17, 2021

试了一下,不能直接用 Emscripten 编译 qfind……qfind 是多线程的,可能要改成单线程的才行。

zfind 倒是可以,但真的要在浏览器里跑耗内存这么多的搜索工具吗?

现在只是成功编译了 zfind,整出来下面这个网页,还没搞明白怎么输入参数:
Screenshot_2021-04-17 Emscripten-Generated Code

@HuntingBot
Copy link
Author

HuntingBot commented May 2, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants