Skip to content

test::black_box for big size T? #38525

Open
@kkimdev

Description

@kkimdev

I'm not sure if this is a bug or not, but I noticed that FB Folly has two versions of doNotOptimizeAway

https://github.com/facebook/folly/blob/1c098e2758d1bd55c48ffa26dab389dbbe96a666/folly/Benchmark.h#L308

asm volatile("" ::"r"(datum));
asm volatile("" ::"m"(datum) : "memory");

First one for size <= long, second one for larger sizes. Where as our test::black_box only has the first version. Is the second one needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions