James Mitchell

198 posts

James Mitchell banner
James Mitchell

James Mitchell

@reductor

Principal Software Engineer at @shgames | Works on @callofduty | Posts on C++, low level optimisations and security. Opinions are my own.

Australia Katılım Şubat 2011
369 Takip Edilen166 Takipçiler
James Mitchell
James Mitchell@reductor·
All feedback is welcome, there is bound to be some bugs in the questions/answers
English
0
0
0
54
James Mitchell
James Mitchell@reductor·
Sharing my fun side project: A C++ Performance Quiz Covers algorithms to low-level gotchas, with Compiler Explorer links to see the generated machine code. Built for fun & intuition, not to judge skill! quiz.cpp-perf.com (Personal project, independent of employer)
English
1
0
2
176
James Mitchell
James Mitchell@reductor·
@notreaIlyjohn @ChShersh That would probably be worse for any text that is heavily ASCII as you introduce a loop carried data dependency, as each loop iteration depends on the data of all previous iterations, where the branch does not so if it predicts correctly it can be significantly faster.
English
0
0
0
26
John
John@notreaIlyjohn·
@ChShersh It would be better to make a lookup table and then ```c++ const uint8_t* data = (const uint8_t*)s.data(); while (i < s.size()) { uint8_t len = utf8_len_table[data[i]]; i += len; width++; } ``` no branch mispredictions
English
1
0
1
84
Dmitrii Kovanikov
Dmitrii Kovanikov@ChShersh·
I needed to implement this function in C++ to count graphemes (aka visible characters) in a string because string .size() returns the number of bytes Invaluable my TUI in C++ implementation
Dmitrii Kovanikov tweet media
English
36
9
295
45.4K
James Mitchell
James Mitchell@reductor·
@abdimoalim_ If it was doubly linked you could go from the head and tail simultaneously and get even better throughput, with less reliance on the nodes being consecutive and potential undefined behaviour.
English
0
0
1
254
James Mitchell
James Mitchell@reductor·
@ID_AA_Carmack My Twitter for you page is full of American right wing politics, I am an Australian game developer, the algorithm is broken. Blue checkmarks ensure visibility and why would I pay for a platform like that? Just look at the responses need to scroll heaps to see one non-blue check
English
0
0
2
98
John Carmack
John Carmack@ID_AA_Carmack·
It would be nice if some of the Twitter diaspora returned. So many creatives, but also many developers, that generally enriched the experience are no longer active. Those that performatively left and those with a seething hatred of Elon probably won’t be back soon, but a lot of people just disengaged on vague cultural grounds that can be reevaluated. There are probably some technical tweaks to the algorithm that could make them more comfortable. I don’t mind the existence of independent echo chambers that people are happy within. There is only a problem when some echo chambers are allowed and others aren’t. Reach out to lapsed friends!
English
680
232
5K
662.7K
Elliot Gale
Elliot Gale@Cali_burbia·
@MickWest Your analysis goes to great length to suggest a prosaic explanation w/o considering why a trained pilot isn’t accustomed to seeing glare rotation. That’s a problem. You think pilots haven’t looked at flir while banking? Do better.
English
3
0
8
155
Mick West
Mick West@MickWest·
Marik is wrong, and perhaps a little confused. I stand by my Gimbal "glare" hypothesis, as it's backed by the facts. What I actually said: metabunk.org/threads/some-r… I'm quite happy with the position that the totality of the evidence I outlined in my original video shows that it's a rotating glare, even if there are some unanswered questions about some aspects of the rotation. I don't think they are significant to the overall argument. Frankly, I think you can tell it's a glare just by looking at it, with the motion, the background light pattern movement, and the diffraction spikes. The observables are just more measurable. I'm open to being proven wrong. I see Marik is tweeting about me panicking as my life's work collapses around me, which is a bit odd. I largely lost interest in this years ago, as I think it went about as far as it could. It's fun to revisit from time to time, and I may at some point shift it all over to the more general Sitrec framework for some more experiments as the available tools improve. But right now, I think if you want to declare it to not be a glare, you've got a significant challenge in explaining your determination to anyone who has not spent years looking at it. Zaine, I admire your persistence, but I think you keep getting things wrong in very complicated ways. I just don't think it's worth my spending many hours trying to unravel and confirm or rebut that when nobody else understands what it is I'd be confirming or rebutting. I anticipate having more free time around April, maybe I'll revisit it then. But, as I said three years ago: No rush though. Here's my original analysis. Aside from some uncertainty about a small part of the initial rotation, everything else is still valid. youtube.com/watch?v=qsEjV8…
YouTube video
YouTube
Marik vR@MvonRen

BREAKING: @MickWest all but admits his signature Gimbal “glare” theory is false and says, in effect, “It’s so complicated, good luck trying to convince people I’m wrong.” This is truly outrageous. It’s also pseudo-skepticism 101. A scientist’s response: metabunk.org/threads/some-r…

English
21
4
64
8.9K
James Mitchell
James Mitchell@reductor·
Playing with AI slop for a non-existant CPU performance tool, now I wish it was real.
James Mitchell tweet media
English
0
0
0
65
James Mitchell
James Mitchell@reductor·
@Bias_Zebra @lemire What a crazy assumption, I dont want everyone poor, I want incentive for people to do things, I just dont want extreme wealth inequality. I am for capitalism with reasonable taxes and suppprt systems for everyone. A rich country shouldnt have starving homeless kids.
English
0
0
0
8
Daniel Lemire
Daniel Lemire@lemire·
Compare these two outcomes: 1. Everyone becomes twice as a rich, except for the richest 1% who become 10x richer. 2. Everyone remains more or less the same, no progress. The story we have been told, repeatedly, is that scenario (1) is bad as it increases relative differences between the richest and poorest people. And that these differences affect people's health, sense of well-being and so forth. It is definitively true that some people are, by nature, envious. We all rare, to a point. I am envious of Linus Torvalds for having invented Linus. What was I doing ? I could have done that! But my envy does not make me unhappy. If it did, it would be a mental disease. Yes, if Joe has enough to eat and you do not, then it is a natural instinct to go after Joe. But in scenario (1), there is plenty to eat for everyone. When a friend of mine is doing well... earning a lot of money... I am happy. It is maybe time to retire this meme that inequality of outcomes is inherently bad.
Robin Hanson@robinhanson

"meta-analysis of 168 studies … 11,389,871 participants from 38,335 geographical units … Contrary to popular narratives, random-effects models showed that individuals in more unequal areas do not report lower subjective well-being" nature.com/articles/s4158…

English
84
77
995
92.9K
James Mitchell
James Mitchell@reductor·
@britcatala @lemire Inflation is caused by many things, doubling everyones income and 10x for the rich is essentially printing money. However in this case the inflation would be part of the wage-price spiral which is a macroeconomics theory where rising prices lead to higher prices.
English
0
0
0
16
Ayushi☄️
Ayushi☄️@iyoushetwt·
>Linux is C >Git is C >Python interpreter (CPython) is C >Ruby interpreter (MRI) is C >PostgreSQL is C >SQLite is C >Redis is C >MySQL is C++ >MongoDB is C++ >Unreal Engine is C++ >Chrome is C++ >Firefox is C++ >Windows kernel is C >macOS kernel (XNU) is C >Photoshop is C++ >VMware is C++ >TensorFlow (Core) is C++ -still, you are not convinced to learn C and C++
English
576
895
13.5K
1.2M
Raja
Raja@rajaboys·
@iyoushetwt EditPlus – my primary code editor during the early stages of my career for HTML template conversion and PHP development.
English
1
0
1
82
Ayushi☄️
Ayushi☄️@iyoushetwt·
What was the first code editor you ever used? Mine was Sublime Text
Ayushi☄️ tweet media
English
3.4K
188
5.1K
668.5K
James Mitchell
James Mitchell@reductor·
@benjoffe What is your use case? It seems strange that this would be a bottleneck
English
1
0
0
122
James Mitchell
James Mitchell@reductor·
My @GCAPConf talk on Lessons Learned from two decades of writing bad code has gone up on YouTube. I introduce a new way to iterate Linked Lists that is twice as fast as the traditional approach without changing the data structure. youtu.be/1YrenWdSeO0
YouTube video
YouTube
English
0
0
0
98
James Mitchell
James Mitchell@reductor·
@geofflangdale I am conflicted if its good/bad to recommend his content, he is knowledgable about many things he discusses and has some good content for people to learn from in an area that there isnt much, then some is strawman arguments to his followers that dont see the strawmaning like OOP
English
1
0
2
104
Geoff Langdale
Geoff Langdale@geofflangdale·
@reductor Yup - 5 years, and imo aside from Granny3D, not the lead on the big name projects (Bink/Oodle) that he mentions constantly in his bios. I just constantly see people quoting his weird stuff on OO as if it's gospel and not the opinion of some random dude.
English
1
0
4
119
Geoff Langdale
Geoff Langdale@geofflangdale·
Idle curiosity: how many people worked at RAD Game Tools during the peak Bink/Oodle period, and what was Casey Muratori's contribution to their flagship products?
English
2
0
1
707
James Mitchell
James Mitchell@reductor·
@feliperybas @valigo Its really isnt a must watch, its a strawman argument. With a contrived example and benchmark which will intentionally make the "clean code" slow. Combined with saying clean code is something that it is not, just like OOP often gets misrepresented as something it is not.
English
0
0
0
14
Valentin Ignatev
Valentin Ignatev@valigo·
>commits most of OOP sins >getters and setters >classes with inheritance >loves managers >loves singletons >loves small functions >uses STL >still sold 6-7 million copies of his games. Is OOP good after all, or it doesn't matter what you do if end product is good?
Valentin Ignatev tweet media
English
121
29
1.3K
881.4K
James Mitchell
James Mitchell@reductor·
@unclebobmartin People who lookup components by entity id frequently on ECS and think thats how you use it are often using it incorrectly and can end up just as slow as naieve OOP.
English
0
0
1
20
James Mitchell
James Mitchell@reductor·
@unclebobmartin I dont hate OOP you can write fast OOP just like you can write slow ECS code, neither are magic bullets. SIMD use cases are small, arrays are the powerhouse you aim to do bulk operations on one or more arrays, helping hardware prefetching, less load data dependencies, etc.
English
1
0
1
160
Uncle Bob Martin
Uncle Bob Martin@unclebobmartin·
Morning bathrobe rant: ECS
English
11
4
83
8.6K