From 1c74049991ed67d3b11ade6532b2ce5c2c895be2 Mon Sep 17 00:00:00 2001 From: Roy van Rijn Date: Thu, 4 Jan 2024 23:22:48 +0100 Subject: Updating Roy's submission * Added tests for endian-calculations (had these in a different class, perhaps handy for others to see as well) Inlined the hash function, runs locally in 2.4sec now, hopefully endian issues fix Added equals to support any city name up to 1024 in length, don't rely on hash * For clarity I've updated the code so endian doesn't change the hashes, easier to debug. * Fixing bug in array check Simple is faster * Also spotted the diff, not just the big exception Fixed buffer limit issue --- calculate_average_royvanrijn.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calculate_average_royvanrijn.sh') diff --git a/calculate_average_royvanrijn.sh b/calculate_average_royvanrijn.sh index ede6451..c1e595d 100755 --- a/calculate_average_royvanrijn.sh +++ b/calculate_average_royvanrijn.sh @@ -15,7 +15,7 @@ # limitations under the License. # - +sdk use java 21.0.1-graal # Added for fun, doesn't seem to be making a difference... if [ -f "target/calculate_average_royvanrijn.jsa" ]; then JAVA_OPTS="-XX:SharedArchiveFile=target/calculate_average_royvanrijn.jsa -Xshare:on" -- cgit v1.2.3