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

compiler optimization #611

Open
arakov opened this issue Aug 25, 2023 · 0 comments
Open

compiler optimization #611

arakov opened this issue Aug 25, 2023 · 0 comments

Comments

@arakov
Copy link
Member

arakov commented Aug 25, 2023

  • native support for getter / setter in structs and classes
  • compiler - if the method has no call operation, no need to set arg length
  • bcwriter : openFrame - should flush only used arguments (e.g. for test[1] - only one xflush)
  • no need to store an argument for the function (constructor)
  • interface - can the wrapper class be saved to use it several times?
  • optimize operations with byref dynamic variable (no need for boxing / unboxing) - should be locally boxed
  • allow to work with ref directly
  • simplify operations with ref variable - if (0 == (cast int(theTop))) { ... }
  • optimization : xstore sp:1, r:0
  • jumping - aligning the target to 4 / 8
  • native support for real to long and long to real
  • external call : pass int constants directly
  • primitive operations : support all comparison operations (not only <, == and !=)
  • optimize a ? b : c - do not use branching
  • equal native bool operation
  • optimization : direct access for the simple properties
  • optimization : direct access for array indexer
  • calling dynamic message : the message variable is boxed, is it possible to do it without boxing?
  • why there are duplicates GA_EXT_OVERLOAD_LIST (e.g. __getClassName)?
  • cache the results of resolveMessageAtCompileTime
  • if self variable is not used - do not store it
  • if the variable is not used - remove it from stack; the local variables must be recalibrate in this case
  • copying the data - take the alignment into account
  • opening frame - filling and so on
  • struct copying - must be optimized to 4 / 8 dependent on the architecture
  • accessing struct field must take into account data field alignment
  • direct operation required for: singleton helper { get(out int n) { n := 2; } }
  • pi under 6 sec
  • if:is / cast operation can be optimized : if the object has no custom dispatcher probably it is enough to check vmt content
@arakov arakov added this to the ELENA 6.0 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant