Every modern openjdk build is licensed as GPLv2 + classpath exception. That exception includes hotspot, since it's part of the jvm. That exemption allows shipping the JVM with your app or linking to it. Otherwise a bunch of enterprise software couldn't exist.
PG JSON write operations are document level whereas with Mongodb it's field level.
Would you use a DB that only let you write an entire row instead of setting a single field? Race conditions galore. Be very careful choosing PG for JSON in production systems...
Nope. If two writes happen concurrently on different fields you'll lose one write, unless you lock. The storage layer just stores the data as a blob that gets overwritten every time, it doesn't support partial updates.
(to be fair the memory manager reuses memory, so it's not calling out to malloc all the time, but yes a manually-managed impl. will be much more efficient)
Whichever way you manage memory, it is overhead. But the main problem is the language does not have zero copy semantics so lots of things trigger a memcpy(). But if you also need to call malloc() or even worse if you have to make syscalls you are hosed. Syscalls aren’t just functions, they require a whole lot of orchestration to make happen.
JavaScript engines also are also JITted which is better than a straight interpreter but except microbenchmarks worse than compiled code.
I use it for nearly all my projects. It is fine for most UI stuff and is OK for some server stuff (though Python is superior in every way). But would never want to replace something like nginx with a JavaScript based web server.
V8 does a lot of things to prevent copies. If you create two strings and concat them and assigned to a third var, no copy happens (c = a+b, c is a rope). Objects are by reference... Strings are interned.. the main gotcha with copies is when you need to convert from internal representation (utf16) to utf8 for outputs, it will copy then.
My no PWM laptops look fine to me for watching movies. Sure, less efficient. But if I can't look at it for more than 30 seconds without my eyes burning then what's the point?
reply