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

[OpCode Benchmark] add benchmark files #3528

Draft
wants to merge 39 commits into
base: HF_Echidna
Choose a base branch
from

Conversation

Jim8y
Copy link
Contributor

@Jim8y Jim8y commented Oct 11, 2024

Description

This pr adds opcode benchmark files to ease the further work.

Fixes #

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@nan01ab
Copy link
Contributor

nan01ab commented Oct 11, 2024

Gooood job!

Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

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

I can't see anything beneficial if none of them contain a valid test, lots of classes that do nothing are not worth much (in my opinion)

@Jim8y
Copy link
Contributor Author

Jim8y commented Oct 12, 2024

@shargon we are working on benchmarking all of them, creating them one by one is unnecessary so I use script to create all of the files since we will otherwise create them one by one. This is benchmark, please dont use core-standard to review them.

@Jim8y
Copy link
Contributor Author

Jim8y commented Oct 12, 2024

I do empty files for

  • 1, make it easier for you to review, since it contains no actual logic in those files,
  • 2, easier for us to work, no need to create those files manually, and avoid missing opcodes.

@Jim8y Jim8y marked this pull request as draft October 12, 2024 01:49
@Jim8y
Copy link
Contributor Author

Jim8y commented Oct 12, 2024

I will fill those files with basic one opcode tests to make sure it is effective.

@shargon
Copy link
Member

shargon commented Oct 12, 2024

Ok, i will approve it when it's reqdy to review

@roman-khimov
Copy link
Contributor

Many instructions require some setup before they can be tested, so in its current form this doesn't make much sense. Better merge real tests instruction after instruction (more likely sets of those).

# Conflicts:
#	benchmarks/Neo.VM.Benchmarks/InstructionBuilder/InstructionBuilder.cs
#	benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs
#	benchmarks/Neo.VM.Benchmarks/OpCode/Benchmark.Opcode.cs
#	benchmarks/Neo.VM.Benchmarks/OpCode/BenchmarkEngine.cs
#	benchmarks/Neo.VM.Benchmarks/OpCode/OpCodeBase.cs
#	benchmarks/Neo.VM.Benchmarks/VMTypes/Benchmarks_Convert.cs
@Jim8y Jim8y changed the base branch from master to HF_Echidna November 18, 2024 15:56
@Jim8y Jim8y added the Hardfork label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants