Skip to content

Benchmark specialized distribution implementations#1063

Merged
dhardy merged 1 commit intorust-random:masterfrom
vks:bench_specialized_distr
Nov 2, 2020
Merged

Benchmark specialized distribution implementations#1063
dhardy merged 1 commit intorust-random:masterfrom
vks:bench_specialized_distr

Conversation

@vks
Copy link
Contributor

@vks vks commented Oct 27, 2020

As noted in #1062, this demonstrates that Exp1 is slower than Exp, which kind of defeats its purpose.

@vks vks mentioned this pull request Oct 27, 2020
@dhardy
Copy link
Member

dhardy commented Oct 28, 2020

Presumably the optimiser can remove the addition/multiplation by identity here.

There is still one other potential reason to use Exp1/StandardNormal: to reduce data size within some other sampler instanced many times. This doesn't require explicit documentation, except perhaps pointing out that they are the building blocks.

Copy link
Member

@dhardy dhardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we might as well merge this.

@dhardy dhardy merged commit ce59c9c into rust-random:master Nov 2, 2020
@vks vks deleted the bench_specialized_distr branch November 2, 2020 15:01
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.

2 participants