Earlier quoted context omitted.
That's been around since C++11 although it's kind of weird to see it used for a char*
A bit weird, but I would support a local style guide that limits initialization style choices to parens for calling non-initializer-list constructors and braces for everything else — for simplicity, consistency, less confusion with assignment, and that odd case where it would actually catch an error (unindended narrowing conversion).
Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
21–30 of 51 posts
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#22Thanks for sharing. Is understanding how best to utilize computer hardware part of a classic CS program or is most learned on the job? I studied Econ in college and been a python guy for last 8 years but have no knowledge of how the machine actually interacts with my code. Is there a formal name for understanding that?
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#23Earlier quoted context omitted.
No matter how advanced we think we are we are still worrying about minutiae like trimming spaces from strings.
humans putting text into form fields will never go away probably, so you will always have to do this at some point.
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#24Thanks for sharing. Is understanding how best to utilize computer hardware part of a classic CS program or is most learned on the job? I studied Econ in college and been a python guy for last 8 years but have no knowledge of how the machine actually interacts with my code. Is there a formal name for understanding that?
EDIT: Link to course in OpenCourseware if you want to virtually take it: https://ocw.mit.edu/courses/6-004-computation-structures-spr...
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#25Earlier quoted context omitted.
No matter how advanced we think we are we are still worrying about minutiae like trimming spaces from strings.
humans putting text into form fields will never go away probably, so you will always have to do this at some point.
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#26SVE and SVE2 are similar to Intel's AVX512-etc for vector, I would use intrinsics instead of hand crafting ASM code, unless it's a performance bottleneck. And yes if you want to play with SVE, Amazon's own ARM chip is the best one available now, maybe the only one in fact, for the general public.
This means there is no need for continually updating the instruction set with longer and longer versions of the same instructions. Hopefully this leads to a more stable base and wider adoption, we’ll see how that works in practice though!
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#27> char * init_out{out}; Are the curly braces in the initialization some new C++ syntax? I haven't been keeping up with C++ developments in the last decade or so. Based on the code that follows I would expect char* init_out = out;
That's been around since C++11 although it's kind of weird to see it used for a char*
Re: Trimming spaces from strings faster with SVE on an Amazon Graviton 3 processor
#28Thanks for sharing. Is understanding how best to utilize computer hardware part of a classic CS program or is most learned on the job? I studied Econ in college and been a python guy for last 8 years but have no knowledge of how the machine actually interacts with my code. Is there a formal name for understanding that?
If you’re interested in learning more about microarchitectural optimization I find that getting a basic understanding of how a modern processor has evolved and then reading posts like these (looking things up when necessary) can get you mostly up to speed with the area. Most people don’t use these details in their everyday code so if you’re just looking to make your code fast learning how to measure algorithmic complexity and use a profiler is likely to be much more valuable.