Skip to content

Add C++ Implementation#4

Open
jwasinger wants to merge 6 commits intomasterfrom
f6m_mul_native
Open

Add C++ Implementation#4
jwasinger wants to merge 6 commits intomasterfrom
f6m_mul_native

Conversation

@jwasinger
Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: poemm <36397285+poemm@users.noreply.github.com>
@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
Copy Markdown

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://github.com/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
Copy Markdown

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