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

free or reuse unconditionally when value is unique #5622

Merged
merged 6 commits into from
Jun 28, 2023
Merged

Conversation

folkertdev
Copy link
Contributor

No description provided.

@folkertdev
Copy link
Contributor Author

the benchmarks fail on deriv, but locally I get these results

hyperfine ./old ./new
Benchmark #1: ./old
  Time (mean ± σ):     397.3 ms ±  11.1 ms    [User: 362.5 ms, System: 33.6 ms]
  Range (min … max):   387.1 ms … 415.5 ms    10 runs
 
Benchmark #2: ./new
  Time (mean ± σ):     372.8 ms ±   2.6 ms    [User: 342.1 ms, System: 30.0 ms]
  Range (min … max):   369.2 ms … 377.5 ms    10 runs
 
Summary
  './new' ran
    1.07 ± 0.03 times faster than './old'

so I'm inclined to ignore the CI failure

@folkertdev
Copy link
Contributor Author

results for cfold, with n = 20 (using a c platform to work around zig's limitations on recursion)

Benchmark #1: ./old
  Time (mean ± σ):     867.7 ms ±  20.2 ms    [User: 480.9 ms, System: 386.8 ms]
  Range (min … max):   854.1 ms … 921.5 ms    10 runs
  
Benchmark #2: ./new
  Time (mean ± σ):     752.6 ms ±  21.0 ms    [User: 447.1 ms, System: 305.3 ms]
  Range (min … max):   736.4 ms … 802.6 ms    10 runs
 
Summary
  './new' ran
    1.15 ± 0.04 times faster than './old'

and deriv with n = 10

Benchmark #1: ./old
  Time (mean ± σ):      3.018 s ±  0.018 s    [User: 2.781 s, System: 0.236 s]
  Range (min … max):    2.993 s …  3.051 s    10 runs
 
Benchmark #2: ./new
  Time (mean ± σ):      2.939 s ±  0.022 s    [User: 2.688 s, System: 0.247 s]
  Range (min … max):    2.918 s …  2.976 s    10 runs
 
Summary
  './new' ran
    1.03 ± 0.01 times faster than './old'

so to me that is sufficient proof that there is no regression for deriv, and we actually get a nice speedup for cfold.

@JTeeuwissen
Copy link
Contributor

In addition, the IR does not have any irregular changes.

@rtfeldman rtfeldman merged commit 0ade2a8 into main Jun 28, 2023
@rtfeldman rtfeldman deleted the reset-reuse-free branch June 28, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants