Better HN
topnewbestaskshowjobs
Log inSign up

peter_lawrey

68 karma · joined Jul 13, 2011 (15y ago) · 95 submissions

Submissions

comment 4mo ago · link · parent

TL;DR: Markdown for AI working documents, AsciiDoc for curated human-reviewed specs, HTML only as a publishing target.

2.

Which Doc Format Is Best for AI Specifications?(blog.vanillajava.blog ↗)

3 points · by peter_lawrey · 4mo ago · 1 comment

comment 4mo ago · link · parent

AI has improved over the last 6 months, with quality in the mid-range. It takes less effort to get it to produce a mediocre-to-average-quality solution. In many cases, this is good enough. For production, while we still need a rewrite, there is less effort required to prototype it first.

comment 4mo ago · link · parent

A common mistake appears to be that only when women have fewer than 1 child does the population drop long term...

comment 4mo ago · link · parent

This post explores using AI as a mock User, something AI is particularly suited for. - AI remembers nothing from previous tests by default. - It has a broad knowledge set - It reads most of the documentation

6.

Testing Java Memory Management with Chronicle-Fix Using AI(blog.vanillajava.blog ↗)

1 points · by peter_lawrey · 4mo ago · 1 comment

comment 4mo ago · link · parent

In this post I look at a simple event to response latency benchmark, MarketDataSnapshot to NewOrderSingle at 50K/s for 30 minutes using JLBH to test Chronicle-FIX. The goal is to compare a system which is doing redundant work (in this case logging each message using SLF4J), compared with not logging (Chronicle-FIX records every message internally using Chronicle Queue) and how this changes the choice of Garbage Collector

8.

Tune Code Before Your Garbage Collector(blog.vanillajava.blog ↗)

39 points · by peter_lawrey · 4mo ago · 39 comments

comment 4mo ago · link · parent

Thank you for the feedback

comment 4mo ago · link · parent

Good feedback

comment 4mo ago · link · parent

This is a high-level article; for lower-level details, I also posted.

https://blog.vanillajava.blog/2026/06/testing-java-memory-ma...

https://blog.vanillajava.blog/2026/06/why-you-should-tun-cod...

Suggestions welcome, it can be hard to know what to include or not.

comment 2y ago · link · parent

7 Frequently Asked Questions about Low-latency Microservices in 7 minutes

13.

What do you believe is different about low-latency microservices [video](youtube.com ↗)

1 points · by peter_lawrey · 2y ago · 1 comment

comment 4y ago · link · parent

Most Iterators should be placed on the stack anyway. If they are not and you have a random access collection like ArrayList you can use an index, but this is rarely needed. If you are going to change code, perhaps Stream(s) are a better choice, these are also placed on the stack most of the time.

comment 4y ago · link · parent

A friend of mine is working at Oracle on collections that support primitives e.g. List<int>, Set<long> https://openjdk.org/jeps/8261529

comment 4y ago · link · parent

Iterators tend to be placed on the stack in hot code. In the benchmark I had to make sure these object weren't optimised away.

comment 4y ago · link · parent

Mutable objects have their own issues, which can catch people out by surprise. Having good test coverage is important.

comment 4y ago · link · parent

Reusing your objects can be confusing for other developers. You need to be careful with anything exposed via an API, however internally you can me more optimised.

comment 4y ago · link · parent

In each case the default settings were used (i.e. no options were provided). In both Java 8 (Parallel GC) and Java 11+ (G1), As the GC was a small portion of the time, changing the GC wasn't expected to make a difference anyway.

comment 4y ago · link · parent

The GC isn't involved with allocation, the expensive bit here. The GC handles the clean up. The allocations create memory pressure that can easily saturate the bus to DDR if you are not careful.

comment 4y ago · link · parent

Right, it's the total object count at runtime that matters, not how many lines of code could create an object.

comment 4y ago · link · parent

This is where using a profiler like YourKit or Flight Recorder is your friend. It will show you the objects that can't be optimised away and where code bottlenecks are. It's hard to determine this in advance for Java.

comment 4y ago · link · parent

or FPGA

comment 4y ago · link · parent

Something not generally mentioned is that Java can inline what would be virtual methods in C++, it can also remove them as behaviour changes or code is unloaded.

comment 5y ago · link · parent

In the real world projects, with the developers you can get, and the time frames you are given, not the developer you might want and any amount of time, Java can be a better choice.

comment 5y ago · link · parent

You can have a look at https://github.com/OpenHFT however it is designed to have most data off heap.

comment 5y ago · link · parent

Not if you need to be able to hire a large number of developers for an investment bank. London has around 300K developers, many in fintech. There isn't that many Rust developers with say 10 -15 years fintech development experience.

comment 5y ago · link · parent

That assumes your commercial model is based on an arms races of just being the fastest. This is not a model investment banks have used for some time.
1234