新闻详情

新闻详情

首页 / 资讯中心 / 详情

AI优化版sqlite和原版简单对比测试

发布时间:2026/11/14 17:41:54来源:尧图网络
AI优化版sqlite和原版简单对比测试
有人利用AI优化sqlite原版源代码得到了更快的结果。https://sqlite.org/forum/forumpost/1f1b969bf4把他公布的代码取下来测试。https://github.com/ksenxx/sqlite-optimized/编译root6ae32a5ffcde:/par/sqlite-optimized-master# ./configure No installed jimsh or tclsh, building local bootstrap jimsh0 Configuring SQLite version 3.54.0 Host System...x86_64-pc-linux-gnu Build System...x86_64-pc-linux-gnu Source dir /par/sqlite-optimized-master Build dir /par/sqlite-optimized-master C compiler... cc C compiler... c Build C compiler...cc Checking for stdlib.h...ok Checking for sys/types.h...ok Checking if -D_FILE_OFFSET_BITS64 is needed...no SQLITE_DEBUG build? no Looking for install ... /usr/bin/install Checking for int8_t...ok Checking for int16_t...ok Checking for int32_t...ok Checking for int64_t...ok Checking for intptr_t...ok Checking for uint8_t...ok Checking for uint16_t...ok Checking for uint32_t...ok Checking for uint64_t...ok Checking for uintptr_t...ok Checking for gmtime_r...ok Checking for isnan...ok Checking for localtime_r...ok Checking for localtime_s...not found Checking for usleep...ok Checking for utime...ok Checking for pread...ok Checking for pread64...ok Checking for pwrite...ok Checking for pwrite64...ok Checking libs for fdatasync...none needed Checking libs for nanosleep...none needed Checking for sys/types.h...(cached) ok Checking for sys/stat.h...ok Checking for dlfcn.h...ok Checking for unistd.h...ok Checking for stdlib.h...ok Checking for malloc.h...ok Checking for memory.h...ok Checking for string.h...ok Checking for strings.h...ok Checking for inttypes.h...ok Checking for zlib.h...ok Checking libs for deflate...-lz Use amalgamation for builds? yes Use gcov? no test-runner flags: no Use #line macros in the amalgamation: no Checking whether the C compiler accepts -fsanitizeaddress...yes Checking whether the C compiler accepts -fsanitizebounds-strict...yes Checking for a suitable tcl... Checking for tclsh9.1...no Checking for tclsh9.0...no Checking for tclsh8.6...no Checking for tclsh...no WARNING: [ sqlite-check-tcl ]: Cannot determine TCLLIBDIR. WARNING: Cannot find a usable tclConfig.sh file. Use --with-tclDIR to specify a directory where tclConfig.sh can be found. SQLite does not use TCL internally, but some optional components require TCL, including tests and sqlite3_analyzer. Checking for TCL to use for code generation... Checking for dirent.h...ok Checking for sys/time.h...ok Checking for realpath...ok TCL for code generation: jimsh Emscripten SDK? not found Statically link tclsqlite3? no Statically link CLI shell? no Checking whether the C compiler accepts -rpath /usr/local/lib...no Checking whether the C compiler accepts -Wl,-rpath,/usr/local/lib...yes Support threadsafe operation? Checking for libs... Checking libs for pthread_create...none needed Checking libs for pthread_mutexattr_init...none needed Checking libs for dlopen...none needed Loadable extension support enabled. Checking libs for ceil...-lm Enabling math SQL functions ICU support is disabled. Checking for line-editing capability... Using linenoise at /par/linenoise Line-editing support for the sqlite3 shell: linenoise (antirez) Build shared library? yes Build static library? yes Feature flags... - fts3 - fts4 - fts5 - geopoly - rtree - session - update-limit - memsys5 - memsys3 - scanstatus - column-metadata - dbpage - dbstat - carray json Library feature flags: -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_PERCENTILE -DSQLITE_HAVE_ZLIB1 -DSQLITE_THREADSAFE1 Shell options: -DHAVE_LINENOISE1 -DSQLITE_DQS0 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PERCENTILE -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION -DSQLITE_HAVE_ZLIB1 -DSQLITE_STRICT_SUBTYPE1 Created Makefile from Makefile.in Created sqlite3.pc from sqlite3.pc.in Created sqlite_cfg.h root6ae32a5ffcde:/par/sqlite-optimized-master# make root6ae32a5ffcde:/par/sqlite-optimized-master# ./sqlite3 SQLite version 3.54.0 2026-08-07 05:31:08 Enter .help for usage hints. Connected to a transient in-memory database. Use .open FILENAME to reopen on a persistent database. SQLite-3.54 memory- SQLite-3.54 memory- .exit两个简单比较测试1.group by generate_seriesrootDESKTOP-59T6U68:/par# ./sqlite35303 --version3.53.32026-06-2620:14:12d4c0e51e4aeb96955b99185ab9cde75c339e2c29c3f3f12428d364a10d782c62(64-bit)rootDESKTOP-59T6U68:/par# time echo select sum(value) from generate_series(1,100000000) group by round(log10(value))|./sqlite35303 ╭──────────────────╮ │sum(value)│ ╞══════════════════╡ │6│ │490│ │49590│ │4950617│ │494990550│ │49499924625│ │4949999577625│ │494999997290973│ │4500000053215524│ ╰──────────────────╯real0m28.522suser0m22.832s sys0m5.659s rootDESKTOP-59T6U68:/par# sqlite-optimized-master/sqlite3 --version3.54.02026-08-0705:31:08fafefb59481530255a881f22b1f75b587731867d00eabea39eaec7da2199alt1(64-bit)rootDESKTOP-59T6U68:/par# time echo select sum(value) from generate_series(1,100000000) group by round(log10(value))|sqlite-optimized-master/sqlite3 ╭──────────────────╮ │sum(value)│ ╞══════════════════╡ │6│ │490│ │49590│ │4950617│ │494990550│ │49499924625│ │4949999577625│ │494999997290973│ │4500000053215524│ ╰──────────────────╯real0m21.271suser0m15.949s sys0m5.311s2.使用数独求解SQL求解中级问题WITHRECURSIVE input(sud)AS(VALUES(....754..........8.8.19....3....1.6........34....6817.2.4...6.39......2.53.2.....),(3.........5.7.3..8....28.7.7......43...........39.41.54..3..8..1...4....968...2..)),digits(z,lp)AS(VALUES(1,1)UNIONALLSELECTCAST(lp1ASTEXT),lp1FROMdigitsWHERElp9),x(s,ind)AS(SELECTsud,instr(sud,.)FROMinputUNIONALLSELECTsubstr(s,1,ind-1)||z||substr(s,ind1),instr(substr(s,1,ind-1)||z||substr(s,ind1),.)FROMx,digitsASzWHEREind0ANDNOTEXISTS(SELECT1FROMdigitsASlpWHEREz.zsubstr(s,((ind-1)/9)*9lp,1)ORz.zsubstr(s,((ind-1)%9)(lp-1)*91,1)ORz.zsubstr(s,(((ind-1)/3)%3)*3((ind-1)/27)*27lp((lp-1)/3)*6,1)))SELECTsFROMxWHEREind0;执行。rootDESKTOP-59T6U68:/par# time ./sqlite35303 sudomid3.sql ╭─────────────────────────────────────────────────────────────────────────────────────╮ │ s │ ╞═════════════════════════════════════════════════════════════════════════════════════╡ │ 693875412145632798782194356357421869816957234429368175274519683968743521531286947 │ │ 387419526259763418641528379716285943594631782823974165472396851135842697968157234 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ real 0m1.128s user 0m1.059s sys 0m0.030s rootDESKTOP-59T6U68:/par# time sqlite-optimized-master/sqlite3 sudomid3.sql ╭─────────────────────────────────────────────────────────────────────────────────────╮ │ s │ ╞═════════════════════════════════════════════════════════════════════════════════════╡ │ 693875412145632798782194356357421869816957234429368175274519683968743521531286947 │ │ 387419526259763418641528379716285943594631782823974165472396851135842697968157234 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ real 0m1.086s user 0m1.032s sys 0m0.021s
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

【外设】之大彩串口显示屏 2026/11/15 4:54:16

【外设】之大彩串口显示屏

大彩串口屏初步使用 1 .官网下载 STM32 屏幕 GUI 设计资料 http://www.gz-dc.com/category/typeid/4112 找到 STM32 Keil 工程,移植相关代码因项目而异进行移植,由于项目简单,本人只对用到的指令接口进行修改。 比如:注意事项&…

阅读更多 →
无法下载Windows系统iso文件 2026/11/15 2:04:12

无法下载Windows系统iso文件

当我遇到这个问题的时候,我打开了一个网站: 登录 然后我打算下载的时候: 突然那个官方的连接就可以下载了:

阅读更多 →
【清华代码熊】DeepSeek V4.1 Flash 后训练详解 2026/11/14 10:11:15

【清华代码熊】DeepSeek V4.1 Flash 后训练详解

📌 上期解析了 DeepSeek V4.1 Flash 模型架构改进,本期解析 DeepSeek V4.1 Flash 预训练/后训练技术: 🌟 预训练:45T 文本 多模态混合语料、直接训练 sparse attention(取消 DeepSeek V4 的 dense 冷启动&…

阅读更多 →
Shuffle-R1: Efficient RL framework for Multimodal Large Language Models via Data-centric Dynamic ... 2026/11/14 17:14:38

Shuffle-R1: Efficient RL framework for Multimodal Large Language Models via Data-centric Dynamic ...

文章主要内容和创新点 主要内容 本文聚焦于多模态大语言模型(MLLM)强化学习(RL)训练中的效率问题,提出了一个名为Shuffle-R1的框架。研究发现,当前RL训练存在两个关键缺陷: 优势值坍缩(Advantage Collapsing):批次中大多数优势值集中在零附近,导致有效梯度信号被淹…

阅读更多 →
PRvL: Quantifying the Capabilities and Risks of Large Language Models for PII Redaction 2026/11/14 16:35:50

PRvL: Quantifying the Capabilities and Risks of Large Language Models for PII Redaction

一、文章主要内容总结 本文聚焦于利用大型语言模型(LLMs)实现个人身份信息(PII)脱敏的研究,旨在解决传统脱敏方法(如基于规则的系统、领域特定命名实体识别(NER)模型)泛化能力差、跨格式/跨语境适应性弱的问题。 研究通过全面评估多种LLM架构(包括密集型LLM(D-LLM…

阅读更多 →
LLaVA-RE: Binary Image-Text Relevancy Evaluation with Multimodal Large Language Model 2026/11/15 4:06:36

LLaVA-RE: Binary Image-Text Relevancy Evaluation with Multimodal Large Language Model

文章主要内容和创新点 主要内容 本文聚焦于二进制图像-文本相关性评估任务(判断图像与文本“相关”或“不相关”),针对该任务中文本格式多样、相关性定义随场景变化等挑战,提出了基于多模态大语言模型(MLLM)的解决方案LLaVA-RE。 模型设计:LLaVA-RE基于LLaVA 1.5架构,…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉