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 C++ Implementation #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add C++ Implementation #4

wants to merge 6 commits into from

Conversation

jwasinger
Copy link
Contributor

No description provided.

@jwasinger jwasinger changed the title Add C impl of f6m_mul Add C++ Implementation Aug 11, 2020
@jwasinger jwasinger marked this pull request as ready for review August 11, 2020 20:17
auto start = std::chrono::system_clock::now();

for (auto i = 0; i < 1350; i++) {
result = p1.Mul(p2);
Copy link

Choose a reason for hiding this comment

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

It may be too easy to figure out that Mul always produce the same result or result is discarded. Make sure, Mul() is compiled in separate file. I.e. fix https:/ewasm/evm384_f6m_mul/pull/4/files#diff-7a5bec3042d5d314cdc3d35cd7a2411dR1.

int main(int argc, char **argv) {
F6 p1 {
.a = {
.x = F1(intx::from_string<intx::uint512>("0x0daa35e7a880a2ca3bcea128c5c8d17202945981a13aec134d10c051c1fa23c06b3088c3a380f4b8b1f598e5f390298f")),
Copy link

Choose a reason for hiding this comment

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

Suggested change
.x = F1(intx::from_string<intx::uint512>("0x0daa35e7a880a2ca3bcea128c5c8d17202945981a13aec134d10c051c1fa23c06b3088c3a380f4b8b1f598e5f390298f")),
.x = F1(0x0daa35e7a880a2ca3bcea128c5c8d17202945981a13aec134d10c051c1fa23c06b3088c3a380f4b8b1f598e5f390298f_u512),

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