Comments by "Anony Mousse" (@anon_y_mousse) on "Core Dumped"
channel.
-
This is why the promise of Java drove so many programmers to use such a disgustingly verbose language. I must admit that targeting the JVM is enticing too, if you're writing a compiler. The thing I wonder, and I hope this gives you a video idea, is how does the JVM compare to WASM? Supposedly WASM is faster than JavaScript, but I've also heard that there are features that don't translate over. Since the JVM has basically only grown over the decades, I would think that would hinder WASM as a choice. Obviously, I wouldn't choose JavaScript as a target just because WASM lacks some features, but I might just choose the JVM. This might be confusing because Java and JavaScript are wildly different and incompatible languages, but they're both valid targets if you're writing a compiler since they both offer some level of easy platform agnosticism.
Side note, C would also be decent choice of targets if you make use of third party libraries that are portable, such as GTK, SDL or RayLib. However, that would also add a more developer-centric dependency that would hinder non-technical end users. Most people have a copy of the JVM installed, and nearly everyone has a browser with a JavaScript VM built-in, and those generally don't require them to do more than double click an icon or single click a link.
3
-
2
-
2
-
1
-
1
-
If Android really has a problem with large contiguous blocks of memory, then the easy solution is multiple arrays. Still less memory than a linked list, regardless of how negligible you think one or two pointers are it can cause jagged allocation sizes which means more padding and can add up to a significant amount with the more frames you have. However, the correct solution would be to use low-level access and write your own allocator. Writing your own allocator means you can size the ring buffer to a specific amount of raw frames, tuned specifically for the platform that it's running on, and it'll be faster and lighter in every respect. It's a weird thought, but even with a singular operating system, you can still have different enough hardware that it requires tuning.
In general, I haven't found more than two real-world use-cases for linked lists when dealing with large amounts of data, and those two cases are still highly specialized. When you're storing just a few things, then a linked structure might be fine. If you need algorithmic structure, a tree will always be better than a flat list. If you merely need ordering, in 99% of cases an array is the best.
1
-
1
-
1