@ReimuNotMoe Offtopic question, why do people do padding in combination of u8+u32, and not just u8s? Like here, 2 u8 + 4 u32 is 18 u8. Readability? Is it more readable tho?
@dvyukov And there is nothing wrong with unsafe in rust, whole std is written with it. If you want to do a custom vec (that allocates at arena), you'll probably need some unsafe
@dvyukov First thing that you bottleneck into is allocations, and go version prob uses clever tricks like arena allocators. Rust version does not. Last time I've checked, google native impl aims to do all these tricks, so the fair benchmark should be with that impl
@SebAaltonen@cmuratori I think there is separation between "I want the same logic here and there", and "well, the letters in code seems similar in these places". In first, you want DRY, so if you update the logic, it probably should be updated in all places. But in second, you should really just copy
@SwiftOnSecurity I've actually played csgo only on mouse, when injured my hand. Binded right to w, m4 to a, m5 to d, scroll down to jump and up to reload. I was playing on silvers, but still. Sometimes even had the highest score in my lobby
@SebAaltonen Reminds me of https://t.co/YV4mHKjIc2
If I remember correctly, you can profile your code, and then remove the function from data, and look how much faster real execution can be. Something something includes waiting for other tasks. But you probably couldn't run it for gpu tasks
@seanbax But why lifetimes aren't part of type inference? I always thought, that in rust "ref" is kinda like a template type with lifetime parameter, so it makes it part of the type. I would assume that you want to leave refs without lifetime for compability, but then how do you force b/c
@burntsushi5 I dont quite get where ABA comes if you just use vec, instead of list. Preemptively allocate vec sized numcpy (+eps?), but at first use only first N (1-4), then it seems that you can have single CAS for reading a single cell, and single CAS for writing
@seanbax I mean, as far as I understand, in Rust when compiler/borrow checker sees func call, it only needs to check the func declaration to determine if it's safe. Can same be done here, or are there some c++ flaws that makes it impossible/very hard?