brianush1 / zua Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The instruction pointer for the VM must be stored per coroutine. However, as D does not offer built-in thread-local storage, it is currently stored in a hashmap with the current Fiber being the key (Solution 1).
An alternative solution (Solution 2), if there were no coroutines in Lua, would be to store a single, global IP.
When comparing 7 runs of solutions 1 and 2, taking the best of 1 and the worst of 2 on the given benchmark.lua
file, the times being 375.109 and 184.882 milliseconds respectively, solution 2 outperforms the current solution, being over 2.02 times faster.
More than half the runtime of a given program is spent accessing the instruction pointer. This is not good!
Currently, none of the functions in the string library that rely on pattern matching have been added. Here is a list of the ones that need to be added:
find
format
gmatch
gsub
match
Dumping bytecode that contains a string such as "]] a [["
will re-encode the string as [[]] a [[]]
, which may be problematic for readability purposes.
Currently, the stack size is hard-coded at 16 values. This can be both a waste of space, and too little for some functions, particularly those using large tuples.
Currently, class wrappers only allow overloading toString. This should be expanded to all operator overloads.
GetProcessTimes()
from the Windows API should be used in the implementation of os.clock
.
Currently, erroneous code may produce unwanted output due to the lack of a semantic analysis stage. Some examples of such code:
break -- outside of a loop
(function()
print(...) -- outside of a variadic context
end)()
return true
print'a'
Currently, duplicate strings are duplicated in memory, making comparisons between two strings take O(n) time. This is not ideal, as Lua uses strings in indexing very often, and may be a major bottleneck in performance-sensitive code.
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.