lesserfish / yolk Goto Github PK
View Code? Open in Web Editor NEWLibrary for the C++ Language
Library for the C++ Language
About 600 times slower than raw C++.
Can we maybe reduce this cost to only 100 x ?
Maybe 10x????
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.
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.
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";
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.