上一页 1 2 3 4 5 6 ··· 19 下一页
摘要: // raw res == 0 ? 0 : (res < 0 ? -1 : 1) // from chat-gpt int compareSign(int A) { return (A > 0) - (A < 0); } // int compareSign(int A) { return (A > 阅读全文
posted @ 2024-03-04 17:27 stdpain 阅读(14) 评论(0) 推荐(0)
摘要: mysqlslap --concurrency=80 \ --number_of_queries=800 \ --query="select * from lineorder where lo_orderkey between 510 and 520" \ --delimiter=";" -h $H 阅读全文
posted @ 2024-01-23 11:18 stdpain 阅读(15) 评论(0) 推荐(0)
摘要: https://godbolt.org/z/rh6cK4acx atomic_int a = 10; if (++a == 10) { } if (a.fetch_add(1) == 9) { } 阅读全文
posted @ 2024-01-10 16:04 stdpain 阅读(24) 评论(0) 推荐(0)
摘要: 在CMake中,如果你有多个可执行文件目标,并且你想要它们在链接时串行构建,你可以使用CMake的add_dependencies命令来创建一个依赖链。这将确保在开始构建一个目标之前,它所依赖的目标已经构建完成。 下面是一个简化的步骤说明,展示了如何设置CMakeLists.txt来实现多个可执行文 阅读全文
posted @ 2023-12-22 15:45 stdpain 阅读(136) 评论(0) 推荐(0)
摘要: tuning https://www.yugabyte.com/blog/linux-performance-tuning-memory-disk-io/ https://blog.mi.hdm-stuttgart.de/index.php/2022/04/01/improve-your-stora 阅读全文
posted @ 2023-08-21 19:27 stdpain 阅读(27) 评论(0) 推荐(0)
摘要: change limit ``` cat /proc/$PID/limits prlimit -p $pid --core=unlimited:unlimited prlimit --pid $pid --nproc 65535:65535 ``` 阅读全文
posted @ 2023-06-26 14:34 stdpain 阅读(23) 评论(0) 推荐(0)
摘要: 对于branchless的改造有很多 最简单的: ``` if (a > b) { a += b; } ``` 这种我们其实是可以改写为 ``` a = a > b? a + b : a; ``` 编译器会自动的帮我们编译成branchless的代码: https://godbolt.org/z/h 阅读全文
posted @ 2023-06-01 19:27 stdpain 阅读(39) 评论(0) 推荐(0)
摘要: compile: ``` c++ -g tmp.cc -o starrocks_be ``` split debug info ``` objcopy --only-keep-debug starrocks_be starrocks_be.debug strip --strip-debug star 阅读全文
posted @ 2023-05-26 15:43 stdpain 阅读(56) 评论(0) 推荐(0)
摘要: https://akkadia.org/drepper/cpumemory.pdf benchmark: memmove vs memcpy https://github.com/UK-MAC/WMTools/blob/master/tests/memtest.c memcpy https://st 阅读全文
posted @ 2023-05-04 20:11 stdpain 阅读(107) 评论(0) 推荐(0)
摘要: ### 只能 broadcast 的 join * NULL AWARE LEFT ANTI JOIN * cross join ### 只能 shuffle 的 join * right outer equal join * full outer equal join ### 只能 gather 阅读全文
posted @ 2023-04-21 20:35 stdpain 阅读(28) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 19 下一页