Skip to content

Instantly share code, notes, and snippets.

View isaacg1's full-sized avatar

Izzy Grosof isaacg1

  • UIUC
View GitHub Profile
@isaacg1
isaacg1 / Cargo.toml
Last active May 28, 2023 18:18
Faster sorting network counting
[package]
name = "sorting"
version = "0.1.0"
edition = "2021"
[dependencies]
hashbrown = "0.13.2"
rustc-hash = "1.1.0"
typed-arena = "2.0.2"
# Pos is row-major unfolded grid
# To speed up, cut off if above best so far.
def search():
start = [1, 1, 0, 1, 0, 2, 0, 2, 2]
current_dist = [start]
next_dist = []
dist = 0
seen = set([tuple(start)])
while current_dist:
......X...........X......
......X..........X.......
.......X........X........
......X........X.........
.....X........X.X........
......X.....XX...X.......
.......X...X......X.....X
......X.X.X........X...X.
....XX...X..........X.X..
.XXX......X..........X...

Keybase proof

I hereby claim:

  • I am isaacg1 on github.
  • I am isaacg (https://keybase.io/isaacg) on keybase.
  • I have a public key ASDifHpQrs_Pmz4qfb6ih8S6GsJd-jYkHdC3x9vy8wztHQo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am isaacg1 on github.
* I am isaacg (https://keybase.io/isaacg) on keybase.
* I have a public key ASDifHpQrs_Pmz4qfb6ih8S6GsJd-jYkHdC3x9vy8wztHQo
To claim this, I am signing this object:
@isaacg1
isaacg1 / main.rs
Created July 6, 2017 05:54
Match issue
fn row_to_string(row: &Row) -> String {
// Details unimportant
}
let matches: Vec<(usize, usize)> = self.core
.rows
.iter()
.enumerate()
.flat_map(|(row_index, row)| {
row_to_string(row)
This file has been truncated, but you can view the full file.
A
A's
AA's
AB's
ABM's
AC's
ACTH's
AI's
AIDS's
AM's
I made an example gists.
Isn't it nice?
I made an example gists.
Isn't it nice?