Skip to content

Commit

Permalink
Update Rust README
Browse files Browse the repository at this point in the history
  • Loading branch information
vikman90 committed Feb 23, 2024
1 parent 3dff1d5 commit 58876fc
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions Rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,48 @@

## Rust implementation

### Set up
### Set up (Ubuntu 22.04)

```sh
yum install rustc cargo
```shell
apt install cargo
```

### Build

```shell
cargo build --release
```

### Syntax

```
queens [-h] [-p] [SIZE]
queens [-h] [-p] [-test] [SIZE]
```

<dl>
<dt>-h</dt>
<dd>Show help.</dd>
<dd>Print help.</dd>
<dt>-p</dt>
<dd>Enable parallel mode.</dd>
<dt>-test</dt>
<dd>Enable test output.</dd>
<dt>SIZE</dt>
<dd>Length of the chess.</dd>
</dl>

### Example

```
# cargo run --release -- -p 4000
# cargo run --release -- -p 1024
Queen 1: square 1252
Queen 2: square 2295
Queen 1: square 313
Queen 2: square 3
(...)
Queen 3999: square 3509
Queen 4000: square 1655
Trials: 58765
Discards: 182326630
Time: 4539 ms.
Performance: 0.013 steps/μs.
40.167 discards/μs.
Queen 1023: square 776
Queen 1024: square 549
Trials: 12290
Discards: 10912362
Time: 654 ms.
Performance: 0.019 steps/μs.
16.678 discards/μs.
```

0 comments on commit 58876fc

Please sign in to comment.