- Is it possible to use std::cout for binary output? - 5 Updates
- Putting two colons before std -- is it ever needed? - 2 Updates
- Lock-free LRU-cache-algorithm - 9 Updates
- Conversion operator to pointer-to-array - 3 Updates
- Turn a functor into a function pointer - 5 Updates
- "GotW-ish: The 'clonable' pattern" by Herb Sutter - 1 Update
Jorgen Grahn <grahn+nntp@snipabacken.se>: Sep 26 11:19AM On Wed, 2019-09-25, Paavo Helde wrote: > On 25.09.2019 22:13, Jorgen Grahn wrote: ... >> are the same thing.) > This sounds like a confession you have written an amount of non-portable > code yourself over the years. "I'm happy to be Unix-specific in my code" is such a confession, yes. I care about some things (such as portability between architectures and Unix dialects) but I don't care about Windows or other platforms I don't use, unless someone pays me. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
scott@slp53.sl.home (Scott Lurndal): Sep 26 01:20PM >> are the same thing.) >This sounds like a confession you have written an amount of non-portable >code yourself over the years. That doesn't follow. Unix (more specifically POSIX) code is very portable, by intent. Personally, all the C and C++ code I've written is portable between pretty much every Unix-like operating system. |
scott@slp53.sl.home (Scott Lurndal): Sep 26 01:21PM >I care about some things (such as portability between architectures >and Unix dialects) but I don't care about Windows or other platforms I >don't use, unless someone pays me. Hear! Hear! Andy they couldn't pay me enough to write code for Windows. |
James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 26 07:19AM -0700 On Thursday, September 26, 2019 at 9:20:49 AM UTC-4, Scott Lurndal wrote: > >code yourself over the years. > That doesn't follow. > Unix (more specifically POSIX) code is very portable, by intent. How portable is it to non-POSIX systems? |
legalize+jeeves@mail.xmission.com (Richard): Sep 26 09:28PM [Please do not mail me a copy of your followup] James Kuyper <jameskuyper@alumni.caltech.edu> spake the secret code >> That doesn't follow. >> Unix (more specifically POSIX) code is very portable, by intent. >How portable is it to non-POSIX systems? In particular, C and C++ don't assume POSIX, even though they originated from POSIX-like environments. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Frederick Gotham <cauldwell.thomas@gmail.com>: Sep 26 12:01AM -0700 On Wednesday, September 25, 2019 at 6:51:11 PM UTC+1, Stuart Redmann wrote: > ::std::sin. So if the auto-generated code needed to call ::std::sin, it > should do so by using a full qualification. > Hand-written code should never need the additional qualification. Shouldn't the auto-generated code just simply use prefixes/suffixes to avoid this, e.g. "_autogen__std" instead of "std"? |
Vir Campestris <vir.campestris@invalid.invalid>: Sep 26 09:51PM +0100 On 25/09/2019 14:48, Bo Persson wrote: > It that case it is probably time better spent to have a serious talk > with your collegue, rather than to fill up the code base with millions > of :: during the next decades. Well put. There's an explicit prohibition of calling anything std in our coding standards. Andy |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 10:59PM -0700 On 9/25/2019 1:10 AM, David Brown wrote: > make it easier to get simple patents with less protection than normal > full patents. I believe they stopped after someone used it to patent > the wheel.) for some reason, this makes me think of the following song: https://youtu.be/1RTp1nmA4Xw?list=PLrQSYxsHzOso3PpMNKwTlNhMCK6FMDkzW |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 11:09PM -0700 On 9/25/2019 10:59 PM, Chris M. Thomasson wrote: >> the wheel.) > for some reason, this makes me think of the following song: > https://youtu.be/1RTp1nmA4Xw?list=PLrQSYxsHzOso3PpMNKwTlNhMCK6FMDkzW Perhaps even this, U-neek! https://youtu.be/fjar4qUqBcE |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 11:11PM -0700 On 8/8/2019 11:59 PM, Bonita Montero wrote: > look like? LRU-caches are only possible with doubly-linked lists. > So I thought this woudn't be possible lock-free. But maybe I'm > wrong here and someone can give me an idea. can I sign an NDA? |
Bonita Montero <Bonita.Montero@gmail.com>: Sep 26 08:13AM +0200 >> So I thought this woudn't be possible lock-free. But maybe I'm >> wrong here and someone can give me an idea. > can I sign an NDA? Why? |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 11:33PM -0700 On 9/25/2019 11:13 PM, Bonita Montero wrote: >>> wrong here and someone can give me an idea. >> can I sign an NDA? > Why? I am interested in your algorithm! Makes me think of times past. |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 11:34PM -0700 On 9/25/2019 11:33 PM, Chris M. Thomasson wrote: >>> can I sign an NDA? >> Why? > I am interested in your algorithm! Makes me think of times past. Talk some shop. Membars, efficiency, Relacy... ;^) |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 25 11:49PM -0700 On 8/8/2019 11:59 PM, Bonita Montero wrote: > look like? LRU-caches are only possible with doubly-linked lists. > So I thought this woudn't be possible lock-free. But maybe I'm > wrong here and someone can give me an idea. be wary... Notice the SMR patent, or Hazard Pointers, from IBM is in an abandoned state. Their layers are bigger than yours... YIKES! They can pick and choose. https://patents.google.com/patent/US20040107227A1/en The latest activity. |
Bonita Montero <Bonita.Montero@gmail.com>: Sep 26 11:13AM +0200 >>> can I sign an NDA? >> Why? > I am interested in your algorithm! Makes me think of times past. Something different: my algorithm is fast when fetching blocks from the lru-cache present in the cache, i.e. there can be an arbitrary number of threads doing that. But even this needs at least three CMPXCHGs on three 64 bit values (in a 64-bit-system, in a 32-bit system you would have two 64- and one 32-bit exchange) if there's no collision. I'm asking myself if this would be faster with trans- actional memory, i.e if I'd build something similar like CMPXCHG with TSX-RTM, if this would be faster. I could redesign my "cachline ping pong" code to use TSX-RTM with- out having tested this on my PC; so could anyone here run the num- bers on that? |
Bonita Montero <Bonita.Montero@gmail.com>: Sep 26 08:37PM +0200 > I could redesign my "cachline ping pong" code to use TSX-RTM with- > out having tested this on my PC; so could anyone here run the num- > bers on that? So here's the code: #if defined(_MSC_VER) #include <Windows.h> #include <intrin.h> #elif defined(__unix__) #include <sys/sysinfo.h> #include <sched.h> #include <pthread.h> #include <immintrin.h>
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment