If you can use Java 11,
Take a look to the VarHandle API, using VarHandles is as fast as using Unsafe,
but it does not crash.
For an explanation of the different order modes,
[ https://gee.cs.oswego.edu/dl/html/j9mm.html |
https://gee.cs.oswego.edu/dl/html/j9mm.html ]
Bonus answer: as far a
> From: "Dain Ironfoot"
> To: "mechanical-sympathy"
> Sent: Saturday, June 4, 2022 5:11:49 PM
> Subject: Re: Compute in a lock free way
> Thank you so much Remi!!
> I took your advice of using CAS to update both of them and came up with this
> (Can't use record as still on JDK 11).
> Does this
- Original Message -
> From: "Laurynas Biveinis"
> To: "mechanical-sympathy"
> Sent: Saturday, June 4, 2022 11:03:28 AM
> Subject: Re: Compute in a lock free way
>> I am writing a class to calculate average of prices. We use it to generate
>> buy/sell signal for some financial instrument
> From: "Dain Ironfoot"
> To: "mechanical-sympathy"
> Sent: Saturday, June 4, 2022 12:53:55 AM
> Subject: Compute in a lock free way
> Hello,
> I am writing a class to calculate average of prices. We use it to generate
> buy/sell signal for some financial instruments therefore latency is crucial
> From: "r r"
> To: "mechanical-sympathy"
> Sent: Saturday, February 5, 2022 12:20:12 PM
> Subject: Megamorphic virtual call optimization in Java
> Hello,
> we know that there are some techniques that make virtual calls not so
> expensive
> in JVM like Inline Cache or Polymorphic Inline Cache.
> De: "Henri Tremblay"
> À: "mechanical-sympathy"
> Envoyé: Lundi 22 Mars 2021 12:17:23
> Objet: Re: Tools for understanding GPUs?
> I learned playing with Aparapi ( [ https://aparapi.com/ |
> https://aparapi.com/ ]
> ).
> It's not super complicated but you need to jump right in mechanical symp
.lang.invoke to set it after the fact.
> Anyway very cool what defineHiddenClass will enable.
yes, all these features were available but only internally for the jdk, i think
since jdk 7, finding a safe way to expose them take times.
regards,
Rémi
> On Sunday, Apri
Shameless plug,
i've written a simple library that shows how lookup.defineHiddenClass [1] can
be used to implement dynamic proxies
[ https://github.com/forax/hidden_proxy | https://github.com/forax/hidden_proxy
]
regards,
Rémi
[1] [
https://download.java.net/java/early_access/jdk15/docs/a
> De: "Vitaly Davidovich"
> À: "mechanical-sympathy"
> Envoyé: Lundi 30 Décembre 2019 19:43:27
> Objet: Re: does call site polymorphism factor in method overrides?
> On Mon, Dec 30, 2019 at 1:09 PM Remi Forax < [ mailto:fo...@univ-mlv.fr |
> fo...@univ
> De: "Brian Harris"
> À: "mechanical-sympathy"
> Envoyé: Lundi 30 Décembre 2019 17:13:38
> Objet: Re: does call site polymorphism factor in method overrides?
> Good to know Vitaly!
> So a poor example then. Better example is an abstract class with a method
> implementation that no subtypes over
are not using the same set of fields,
grouping together the implementation of equals and hashCode alleviate this
issue.
> I feel like ObjectSupport is a bit nebulous and open ended and you'd
> inevitably
> end up needing more support methods such as a toString method.
yes, toString
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Vendredi 26 Avril 2019 01:51:47
> Objet: Re: Exotic classes
Hi Steven,
thanks for spending some time on this,
> 1. Why
> public abstract class ObjectSupport {
> public abstract boolean equals ( Object self , Object other );
> p
> De: "mechanical-sympathy"
> À: "mechanical-sympathy"
> Envoyé: Mardi 23 Avril 2019 18:23:48
> Objet: Re: Exotic classes
> Replies inline
> On Monday, April 22, 2019 at 12:37:19 PM UTC-7, Remi Forax wrote:
>>> De: "mechanic
ze later.
so there is a good chance that what you are measuring is not all
de-optimization cost.
Rémi
> On Monday, February 26, 2018 at 11:29:19 AM UTC-8, Remi Forax wrote:
>> Hi all,
>> i'm preparing a talk at DevoxxFR on how to make a field value, a returned
>> val
Hi Steven,
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Samedi 19 Janvier 2019 05:19:06
> Objet: Re: Exotic classes
> On Friday, January 18, 2019 at 5:37:58 AM UTC-8, Rémi Forax wrote
>>> no, CHA only works on class, not on interface.
> You're probably know better than me
> De: "Steven Stewart-Gallus"
> À: "mechanical-sympathy"
> Envoyé: Jeudi 17 Janvier 2019 07:50:13
> Objet: Re: Exotic classes
> I've been working on similar issues trying to optimise something
> heavily. I made a similar class to this one (I even had a similar
> API) but I found I called it Mos
> De: "Gil Tene"
> À: "mechanical-sympathy"
> Envoyé: Mardi 28 Août 2018 00:28:00
> Objet: Re: jHiccup for .NET?
> There is [ https://github.com/HdrHistogram/HdrHistogram.NET | a great
> implementation of HdrHistogram for .NET ] , which makes the rest of what
> jHiccup does nearly-trivial to do.
Hi all,
i'm preparing a talk at DevoxxFR on how to make a field value, a returned
value, etc constant for any decent JITs (everything but c1), so i've bundled
together several patterns i use for implementing dynamic language runtimes into
an Java API
https://github.com/forax/exotic
I would l
> De: "Francesco Nigro"
> À: "mechanical-sympathy"
> Envoyé: Mardi 30 Janvier 2018 15:13:03
> Objet: Re: Call site (optimizations)
> Gil really thank you for the super detailed answer!
> I'm digesting it and I've found an interesting talk with some of these
> concepts
> referenced/mentioned: h
r 27, 2017 at 7:54:11 AM UTC-7, Henri Tremblay wrote:
>>> Hi Rémi,
>>> Highly interesting.
>>> For those like me who are too lazy to read an annotated JVM spec, are you
>>> aware
>>> of a quick summary of how it works somewhere? (over (how to specify
Hi all,
seeing the mail from Peter on how to avoid pointer chasing, instead of using
off-heap data structure, use value types.
Currently, there is a prototype, named the Minimal Value Type, that allows
people to test value types inside the VM.
The spec is here:
http://cr.openjdk.java.net/~dls
> De: "John Hening"
> À: "mechanical-sympathy"
> Envoyé: Lundi 13 Novembre 2017 00:17:32
> Objet: Executing thread by JVM.
> Hello,
> I would like to ask for threads in Java. As we know, JVM uses system threads
> (native threads). So, for example it uses Linux threads. In simplification a
> thr
worrying.
> Mind you, I'm not a fan nor a user of Go so I'm referring purely to their
> stipulated strategy on how to evolve their GC.
Rémi
> On Thu, Dec 22, 2016 at 7:37 AM Remi Forax < fo...@univ-mlv.fr > wrote:
>>> De: "Vitaly Davidovich" <
> De: "Vitaly Davidovich"
> À: mechanical-sympathy@googlegroups.com
> Envoyé: Jeudi 22 Décembre 2016 13:12:00
> Objet: Re: Modern Garbage Collection (good article)
> FWIW, I think the Go team is right in favoring lower latency over throughput
> of
> their GC given the expected usage scenarios fo
Hi Vitaly,
> De: "Vitaly Davidovich"
> À: mechanical-sympathy@googlegroups.com
> Envoyé: Dimanche 18 Décembre 2016 19:00:04
> Objet: Re: private final static optimization
> It doesn't care about reflection - modifying final fields via reflection is
> undefined by the JLS. Unfortunately, the sam
25 matches
Mail list logo