Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hashmash
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
hashmash
4y ago
In theory, a smart compiler could make heavy use of the DP register (6809 feature) and then local variables within a compiled function could access these "fast" global variables instead. This was a common pattern when coding in as
62.
▲
by
hashmash
4y ago
For the code generation phase, it might be easier to bypass emitting a text-based assembly format and just use the ASM library directly. If you want something easier, I wrote a code generation library specifically for that purpose: https:&
63.
▲
by
hashmash
4y ago
> If light rail were put up on it, the value of the adjoining real estate would suddenly go way up and the density would appear. That would require rezoning low density residential areas, which is practically impossible. > About a 10
64.
▲
by
hashmash
4y ago
I live here too. Maybe we can meet some time and have a chat? There's a huge stretch of the old line running up through Kirkland which is pretty much completely surrounded by houses. One option to make it more useful would require buil
65.
▲
by
hashmash
4y ago
Most of the old railways on the Eastside aren't suitable for new development because they're surrounded by low density suburbs. Any stations built along a new line would have very little traffic, making the whole system kind of po
66.
▲
by
hashmash
5y ago
I'm in favor of a not-for-profit healthcare system, but how will such a system prevent future pandemics?
67.
▲
by
hashmash
5y ago
The problem that you outlined is a different one than whether or not exceptions are checked. The further an exception is thrown (call chain depth), the more context that gets lost. This can be fixed with more specialized exception types. My
68.
▲
by
hashmash
5y ago
Most of the software I write is designed to be fault-tolerant, and checked exceptions are fantastic way of detecting potential faults. The problem is that checking is baked into the exception definition instead of its usage. If I declare &q
69.
▲
by
hashmash
5y ago
I ran the test myself with different collectors, including epsilon (which does no GC at all) and was able to reproduce the problem in all cases.
70.
▲
by
hashmash
5y ago
I think this might be it. When I run with the epsilon GC, and run with taskset to force just one CPU core, the performance is consistently bad. When I instruct taskset to use two logical cores, the performance is good. This is a single-thre
71.
▲
by
hashmash
5y ago
> has poor runtime performance Are you referring to performance issues caused by lack of unsigned types? Do you have a specific example? Based on my observations, the conversions necessary for acting on signed types as if they were unsig
72.
▲
by
hashmash
5y ago
I've had to resort to rolling my own mapping layer using JNA. Fortunately, 64-bit mmap support is being added as part of the Panama foreign-memory project.
73.
▲
by
hashmash
5y ago
That's not the statement you made. A safer statement would be, "a simple interpreter for language x, implemented in language y, cannot be faster than language y".
74.
▲
by
hashmash
5y ago
> a language x written in language y cannot by definition be faster than language y A C compiler can be written in Java. Therefore, by "definition", Java is faster than C.
75.
▲
by
hashmash
5y ago
Most likely it's due to the way file I/O is handled. There's extra memory copies going on that are hard to eliminate.
76.
▲
by
hashmash
5y ago
HotSpot usually optimizes the signed-to-unsigned conversion away. This is quite evident when looking at the generated machine code when accessing byte arrays. Although I still find it quite silly that the original post is even considering t
77.
▲
by
hashmash
5y ago
The sample program doesn't compile: Unsound.java:16: error: method upcast in class Bind<A> cannot be applied to given types; return bind.upcast(constrain, t);
78.
▲
by
hashmash
5y ago
Brian Goetz's take on generics: http://cr.openjdk.java.net/~briangoetz/valhalla/erasure.html
79.
▲
by
hashmash
5y ago
> They're effectively just pointers to a lookup table and it's the lookup table that changes. What makes you think this is the case? Pointers to objects are direct, and garbage collectors freely change pointer values whenever i
80.
▲
by
hashmash
5y ago
When new Java features like this are added, it also includes new features and optimizations in the JVM itself. Other languages that compile to the JVM can take advantage of these new features as well, either with no effort, or incrementally
81.
▲
by
hashmash
5y ago
I see that generational ZGC is under development, but have you been able to try it out? I don't see any EA releases for it.
82.
▲
by
hashmash
5y ago
The Lilliput project aims to address this: https://wiki.openjdk.java.net/display/lilliput
83.
▲
by
hashmash
5y ago
The author doesn't really understand how Java escape analysis works, and just focuses on one key aspect: "It does not replace a heap allocation with a stack allocation for objects that do not globally escape." The author then
84.
▲
by
hashmash
5y ago
OpenJDK 64-Bit Server VM warning: Ignoring option --illegal-access=permit; support was removed in 17.0
85.
▲
by
hashmash
5y ago
The Java module system doesn't allow this trick to work anymore. java.lang.reflect.InaccessibleObjectException: Unable to make field private final int java.lang.Integer.value accessible: module java.base does not "opens java.lang&
86.
▲
by
hashmash
5y ago
Windows NT natively supported threads when Java was released, and Java on Windows NT (and Windows 95) in 1996 used OS threads. There were some problems when running on machines with more than one CPU, but I never figured out if this was the
87.
▲
by
hashmash
5y ago
I was griping about Java's lack of unsigned types for over 20 years until it dawned on me why mixing signed and unsigned types together in the same language is a bad idea. Consider when one method returns an unsigned type, but another
88.
▲
by
hashmash
5y ago
> nothing that prevents an Optional variable from actually being null That's why you're supposed to use Optional<Optional<X>>. ;-)
89.
▲
by
hashmash
5y ago
There are certainly cases where Optional is better than a "this can be null" comment, but consider the possibility that the Map interface was designed to always return Optional. If I'm using a Map that I have complete control
90.
▲
by
hashmash
5y ago
Only if you never have the case where Optional is empty but you expected it not to be. How often is Optional.get or orElseThrow called blindly? How often is boilerplate code written which checks if the optional is empty and then throws &quo
More ›