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

Add a new BF implementation in Swift and compile the matmul.swift #378

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

ricvelozo
Copy link
Contributor

I'm using the -Ounchecked compiler flag like some other languages. The -lto compiler flag is apparently experimental, and cause link errors, so I didn't include it.

@dumblob
Copy link

dumblob commented Oct 13, 2021

I'm using the -Ounchecked compiler flag like some other languages.

This comes up every now and then - shouldn't we rather stop disabling the checks in all languages? Sure, it's unfair that some languages don't support these checks (or they do, but it's not a standard practice to use them - e.g. C++), but that's part of the definition of the language which this benchmark tries to showcase.

We have different implementations of the same test in the same language but utilizing different libraries or approaches. So why not to have two variants - one with bounds checking and the other without?

@ricvelozo
Copy link
Contributor Author

I'm using the -Ounchecked compiler flag like some other languages.

This comes up every now and then - shouldn't we rather stop disabling the checks in all languages? Sure, it's unfair that some languages don't support these checks (or they do, but it's not a standard practice to use them - e.g. C++), but that's part of the definition of the language which this benchmark tries to showcase.

We have different implementations of the same test in the same language but utilizing different libraries or approaches. So why not to have two variants - one with bounds checking and the other without?

This is being discussed in #290. Still, the Rust implementation, the third fastest, don't use this type of optimization (just use unsafe to deduplicate the bounds checking), and the Swift version is still slower, as well as the Nim version.

brainfuck/bf.swift Outdated Show resolved Hide resolved
@nuald nuald merged commit 715cbbd into kostya:master Oct 14, 2021
nuald added a commit to nuald/benchmarks that referenced this pull request Oct 14, 2021
nuald added a commit that referenced this pull request Oct 14, 2021
@ricvelozo ricvelozo deleted the bf-swift branch October 14, 2021 16:51
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.

None yet

3 participants