peal / vole

A GAP package for backtrack search in permutation groups with graphs
https://peal.github.io/vole
Mozilla Public License 2.0
8 stars 2 forks source link

Implement ‘proper’ GAP kernel module #23

Open wilfwilson opened 3 years ago

wilfwilson commented 3 years ago

I'm not sure of the correct language to use here.

But @ChrisJefferson was saying that, in order to get acceptable performance in GAP-Julia, he may need to write a proper GAP-kernel-to-Vole-Rust-component connector. This would replace the forking and sockets and networking stuff that can be slow in some cases.

fingolfin commented 2 years ago

This would in particular get rid of the use of IO_fork and IO_WaitPid and friends, and thus the custom SIGCHLD handler in IO, which is a major impediment for using this from within GAP-Julia.

A middle ground might be to switch from using IO to using GAP's own InputOutputLocalProcess. It doesn't support TCP, though -- but it doesn't need to, as it generally works fine even in Cygwin, as it uses posix_spawn, which is high-level enough that Cygwin can implement it sanely on Windows without pipes.

But perhaps there is a deeper reason InputOutputLocalProcess wasn't used in the first place to implement the subprocess communication?

ChrisJefferson commented 2 years ago

One annoying technical issue is that there isn't a Rust compiler for Cygwin, so Vole's Rust component is compiled as a windows executable. That's why I mess about using non-regular pipes on windows.

I should try InputOutputLocalProcess -- I just used IO_fork and friends as it's my natural instinct.