P.S. I didn’t directly address David’s request for that magic number N. I would just assume 32 bits as the conservative element size (for oops) and work from there. If the cache line size is 64 bytes, then N=16. These are robust assumptions, even if they waste a little space when N could be 8 (because oops are 64 bits). If the objects are flattened, N=16 is still conservatively correct, as long as they flatten to at least 4 bytes (which is very likely, and if not just use a primitive array). The same external considerations that determine the D$ line size, to a value other than 64, can also configure the parameter N, to a value other than 16. That is how I would build David’s widget without using Unsafe.
- Re: [External] : Re: New candidate JEP: 471: Deprecate the Me... Ron Pressler
- Re: [External] : Re: New candidate JEP: 471: Deprecate t... John Rose
- Re: [External] : Re: New candidate JEP: 471: Depreca... John Rose
- Re: [External] : Re: New candidate JEP: 471: Deprecate t... David Lloyd
- Re: [External] : Re: New candidate JEP: 471: Deprecate t... David Lloyd
- Re: [External] : Re: New candidate JEP: 471: Depreca... David Lloyd
- Re: [External] : Re: New candidate JEP: 471: Dep... -
- Re: [External] : Re: New candidate JEP: 471:... David Lloyd
- Re: [External] : Re: New candidate JEP:... Ron Pressler
- Re: [External] : Re: New candidate ... David Lloyd
- Re: [External] : Re: New candidate JEP:... Alan Bateman
- Re: [External] : Re: New candidate ... David Lloyd
- Re: [External] : Re: New candid... Alan Bateman