Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
fwsgonzo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
48 ms
·
541.
▲
by
fwsgonzo
6y ago
Performance-wise Lua is not too far behind LuaJIT that you should just "never" use Lua. I used Lua for a long time without problems, and in the cases where you need that extra performance you are just one "system call" a
542.
▲
by
fwsgonzo
6y ago
It's a very tiny API, and requires little assembly, so I agree.
543.
▲
by
fwsgonzo
6y ago
I see, that's unfortunate. I don't have those issues in my emulated environment though. I don't use Lua anymore - I'm running emulated RISC-V in my own emulator. I have been benchmarking against LuaJIT for the longest ti
544.
▲
by
fwsgonzo
6y ago
Yes, I used it in a game engine for many years, on Windows and Linux. No problems on that part. I don't really recommend doing it, unless you want to do it as a learning experiment. It was a fun thing to do.
545.
▲
by
fwsgonzo
6y ago
It's not just a tiny C compiler - it's a compiler you can use as a static library that can compile your C code directly to memory. And then you can call into it, if you dare. I used it as a scripting backend for a long time, but e
546.
▲
Fast RISC-V-based scripting backend for game engines
(github.com)
1 points
by
fwsgonzo
6y ago
|
0 comments
547.
▲
Fixing Another Nintendo M82 Store Demo Unit
(youtube.com)
1 points
by
fwsgonzo
6y ago
|
0 comments
548.
▲
Using Fast Virtual Machines in a Game Engine
(medium.com)
3 points
by
fwsgonzo
6y ago
|
0 comments
549.
▲
by
fwsgonzo
6y ago
Nice work! One step forwards towards a less botched libc for game developers! Should probably be noted that musl isn't necessarily very performant compared to something like glibc. Kudos for getting musl which is very geared towards li
550.
▲
Freestanding Rust in Emulated RISC-V
(medium.com)
2 points
by
fwsgonzo
6y ago
|
0 comments
551.
▲
by
fwsgonzo
6y ago
The explanation is long but I have written about it here: https://medium.com/@fwsgonzo/adventures-in-game-engine-progr... The benchmarks are done here: https://github.com/fwsGonzo/script_bench I a
552.
▲
by
fwsgonzo
6y ago
https://gist.github.com/fwsGonzo/6b12f502a3873725c17f44dc5e2... Very preliminary benchmark C++ Vs Rust on RISCV. C++ is just in its own league. Alone. Having been at CppCon I can attest to the atmosphere of performance
553.
▲
by
fwsgonzo
6y ago
I have the same problem - love working on the game engine (I have several), but thankfully I found someone who loves designing games and drawing pixel art. Also, he doesn't know what "using RISC-V virtual machines with thin C++ bi
554.
▲
by
fwsgonzo
6y ago
This is not a joke: Read the Intel manual, maybe check out some of the learning repos on github that solves all the glue-stuff that isn't important. I have one such repo here: https://github.com/fwsGonzo/barebones
555.
▲
by
fwsgonzo
6y ago
These days I would say you should get into OS development and learn about unikernels. Linux should be a solved problem right now and the future would be in OSes that don't have interrupts enabled and you have full control over the CPU
556.
▲
by
fwsgonzo
6y ago
Thanks, and no, but I am writing occasionally: https://medium.com/@fwsgonzo/adventures-in-game-engine-progr...
557.
▲
by
fwsgonzo
6y ago
I am working on a game with a friend of mine. https://cdn.discordapp.com/attachments/319909531167621130/71... I'm also using C++ as a scripting language inside a virtual machine. It's very performant, th
558.
▲
by
fwsgonzo
6y ago
Not really, it's more trying to use constexpr better and measuring everything as well as inlining as much as you can. This leads to extra compile times which you can combat with precompiled headers. Overall C++ just wins out heavily. N
559.
▲
by
fwsgonzo
7y ago
Looks very cool! Did not see 32-bit RISC-V on the list though, so wondering about that. I would have liked to use Zig cc to build 32-bit RISC-V binaries fast, if that is possible. Doesn't matter if they are freestanding.
560.
▲
by
fwsgonzo
7y ago
I just finished the 32-bit parts of a RISC-V emulator, and I have been doing performance optimizations. Just hit a wall and can't make it any faster, but I'm happy with the speeds now so it's all good. Now I have this really
561.
▲
by
fwsgonzo
7y ago
After reading the reason: The list was of general non-climate scientists who disagreed with the consensus. It made perfect sense to delete it. They are open to creating a list of climate scientists who disagree, although they will probably
562.
▲
by
fwsgonzo
7y ago
To monocasa, which I can't reply to: I agree completely, it really does run everything from start to finish. Sometimes that's what you want, and sometimes you don't. I could break on main as an option, and then start the benc
563.
▲
by
fwsgonzo
7y ago
I have a site for testing these things: https://droplet.fwsnet.net/ I wrote some tests, not sure if they are perfect: #include <stdexcept> volatile int i = 1; __attribute__((noinline)) int test() {
564.
▲
by
fwsgonzo
7y ago
Well, there are several kinds of allocation strategies, so while the general malloc does a best-effort, I have no real choice with exceptions at the moment, other than to turn them off. I do a lot of stuff in embedded, and it would be nice
565.
▲
by
fwsgonzo
7y ago
As a general rule, use them when for truly exceptional situations: Running out of memory, accessing something out of bounds - things that you are checking for anyway, but you don't or don't want to use a return-value-based error h
566.
▲
by
fwsgonzo
7y ago
Seems to be better exceptions than what is already there. And fully compliant as far as I can tell. Someone just had to go out there and do it. From doing my own benchmarks on exceptions, I already know you should basically never use them.
567.
▲
by
fwsgonzo
7y ago
Because threads are traditionally created and scheduled by the OS, so it inevitably involves a costly context switch both first into the kernel and then back again into the next thread, if one is ready. Userspace threads are more light-weig
568.
▲
by
fwsgonzo
7y ago
Probably a lot on bare metal, but we are a special case here. It really brings down the latency to respond to network events. A single context switch is in the range of 100K-1M CPU cycles. The reason why is because we avoid all the indirect
569.
▲
by
fwsgonzo
7y ago
This thread is about the performance of threads, which we have established can be a high cost for some. In our case we don't run on Linux or Windows, but you can still do the same on Linux afaik, although you will have to write a kerne
570.
▲
by
fwsgonzo
7y ago
Yep. We do this on real hardware and never preempt. There is nothing more performant than that. Using IPIs (inter-processor interrupts) you can trigger events like "more work has been added" on each CPUs queue. Additionally, when
More ›