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
> 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
> 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
> 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
act.
> 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, April 26, 2020 at 10:31:20 AM UTC-7, Remi Fo
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] [
> 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
sing 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 and perhaps com
> 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 );
>
> 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
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
> 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
> 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
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
> 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
s 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" < vita...@gmail
19 matches
Mail list logo