Giter Site home page Giter Site logo

yolk's People

Contributors

lesserfish avatar

Stargazers

 avatar

Watchers

 avatar

yolk's Issues

God, this is slow!

About 600 times slower than raw C++.

Can we maybe reduce this cost to only 100 x ?

Maybe 10x????

Comparison and Elementary Operations

So far we have functions for elementary type: long, double.

Implement:

int Compare ( int | unsigned int | long | unsigned long | double | float | char | unsigned char | bool | std::string)
CompareLess
CompareGreater
CompareLessEqual
CompareGreaterEqual

TryAdd
TrySub
TryMul
TryDiv
TryMod
TryAnd
TryOr

In total, that should be: 11 * 10 + 110 implementations.

So it's better if we do this in Python.

Also, modify the instructions:

ADD, SUB, MUL, DIV, MOD, AND, OR, CMPEQ, CMPLS, CMPGT, CMPLSEQ, CMPGTEQ in YVM.cpp

so that they instead do a switch on the data type (when passed an argument which contains data) and invokes the correct function.

Signed comparison in TypedField

In all of the comparison of TypedField, we perform a check:

constexpor bool isUnsigned = std::is_unsigned::value;

This may or may not decrease performance.

Test this, and remove the check if it does.

Inifnite Loop bug!

For some reason, TypedField>>Copy is being called in this long, and failing due to not being copyable or const

"MOVM str:Print\n"
"CLONE REGA, i64:1\n"
"CLONE REGC, i64:0\n"
"CLONE REGB, INT\n" // <- Instead of Long,
".loop_begin:\n"
"CMPEQ REGB, i64:100000\n"
"JNTRUE .loop_end\n"
"ADD REGB, REGA\n"
"ADD REGC, REGB\n"
"JMP .loop_begin\n"
".loop_end:\n"
"PUSHAR REGC\n"
"CALLM\n";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.