Announcement

Collapse
No announcement yet.

Google Announces The Tink Crypto Library

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #41
    It uses at least two pointers (but actually 3) to store its state, that's already enough to say everything.
    PROVE TO ME this is a problem. Give me a benchmark that shows this to be true.

    Comment


    • #42
      Originally posted by computerquip View Post
      Instructions are not cached in the cache line.
      I literally laughed out loud at this one.

      Originally posted by computerquip View Post
      The cache line has absolutely nothing to do with instructions being called, it has to do with how memory is accessed. This isn't even something complicated, you can literally google this and this is the first result you'll get https://en.wikipedia.org/wiki/CPU_cache#Cache_entries

      Are you serious?
      Are you asking that quesiton to yourself? The fucking link you linked says in the Overview about the instruction cache. I've never seen a more delusional confirmation bias cherry picker in my life.

      Most modern desktop and server CPUs have at least three independent caches: an instruction cache...

      It uses the exact same mechanism to pull instructions into the cache lines, 64 bytes at a time.

      Originally posted by computerquip View Post
      EDIT: Actually, I should say that the cache line has very little to do with instructions rather than absolutely nothing. Technically, the CPU will store instructions into *a* cache *though not one you can generally control actively*.
      You can easily control it by aligning your code. WTF are you talking about?

      It's the same with data. And you know the funny thing is if you look at the standard library it doesn't even align the data often. Not a single bit of such "low level optimizations" which btw YOU brought up not me. I never even once even mentioned assembly language in a claim. You brought stuff you've no clue so...

      Originally posted by computerquip View Post
      Most things that you can do to optimize this are already done by the compiler (loop unrolling, map lookup for switch and if-statements, inlining code automatically).
      You are right, but compiler isn't going to align your data, only the code, due to language rules.

      Of course, it's a moot point for vectors, which are very basic. They're required to be contiguous (i.e. a dynamically allocated array) so there's little "optimizations" you can do there. Even there, a std::vector is bloated in its inline members (what gets stored in the std::vector itself, not what it allocates). It's insignificant, but it's still worse than a hand-coded solution, and that's all that matters.

      Like I said before, I never claimed it's a significant advantage to code your own, I merely stated that 1) the standard library is usually worse than what you can code yourself (but again, usually insignificantly worse), and 2) most C++ "programmers" are incapable of implementing those well-known algorithms themselves. Point 2 is the claim I made, and why C++ is made horrible by those people using it. With no special hacks or anything, it's not like the standard library uses them.

      I never claimed you have to use low-level hacks to beat the standard library. I never even said you have to beat it in performance significantly!

      You claimed and assumed like a lot of morons on stack overflow that the standard library uses "every low level hack out there in existence" which is beyond wrong and full of shit assumption. You claimed it's way faster than what you can code, and that's the claim I called bullshit on pal. (see post below)
      Last edited by Weasel; 15 September 2018, 10:40 AM.

      Comment


      • #43
        Originally posted by computerquip View Post
        PROVE TO ME this is a problem. Give me a benchmark that shows this to be true.
        I don't have to prove anything. I didn't claim you can code something significantly better (to show in benchmarks). I simply said the standard library is not optimal, and using 3 pointers even for a basic vector (dynamically allocated array) is not "optimal".

        However, that's beside the point. You are the one who claimed this:
        Originally posted by computerquip View Post
        Algorithms provided in the standard library are often better than what most can write by themselves without a PHD and a white paper to stare at for hours to weeks.
        I don't have to prove the opposite, you have to prove your shit assumptions. Even funnier is that you were talking about algorithms, a more high-level approach than "cache lines" and other low level micro optimizations. Those algorithms are well-known to anyone with half a brain and decency at programming. There's no way the standard library will do better unless you're a total moron.

        Of course, it's not going to do significantly worse, either. But I never claimed that buddy.

        Comment

        Working...
        X