有人利用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
企业数字化 ERP 产品动态
相关推荐
彻底清除代码库 FIXME:Forge resolve-fixme 技能实战指南 人工智能AI Agent代码智能体AI 应用CLI开发工具 【免费下载链接】forgecode AI enabled pair programmer for Claude, GPT, O Series, Grok, Deepseek, Gemini and 300 models 项目地址: https://gitcode.com/gh_mirrors/forge39/forgecode 点击查看 免费下载 导读… · 2026/9/27 21:26:10
廊坊网站公司选对不踩坑,3步搞定性能优化 廊坊网站公司选对不踩坑,3步搞定性能优化 改个需求建站公司拖一周,这种糟心事儿谁没遇到过? 很多老板在廊坊找网站公司,最后发现做出来的页面卡得像… · 2026/9/27 21:26:04
我们可能不再需要手写配置文件了~TaoToken 统一 Key 接入 Cline 实战 /* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views … · 2026/9/27 22:04:36
I-RAVEN-X 基准测试实战:用 TaoToken 统一 Key 跑通类比与数学推理的泛化鲁棒性评测 /* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views … · 2026/9/27 22:04:36
openClaw 安全配置实战:从 Gateway 到沙箱模式,一份可落地的 config.toml 骨架 /* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views … · 2026/9/27 22:04:36
历史事件视频怎么做?从老报纸检索到自动成片的完整流程拆解 做历史事件视频,最耗时的往往不是写稿,而是找画面。老报纸、旧档案、历史影像分散在各地,手动检索、下载、对齐,一条10分钟的视频光素材环节就能耗掉两三个下午。现在的AI素材匹配能力,已经可以把文稿语义直接对应到实… · 2026/9/27 22:04:36
MATLAB雷达信号脉冲压缩仿真:LFM线性调频、匹配滤波与距离分辨率实现 简介:这套Matlab仿真工具完整呈现雷达信号脉冲压缩过程,从线性调频(LFM)信号生成、目标回波仿真到匹配滤波压缩处理均有可运行代码支撑,面向电子信息工程、计算机、数学等专业学生,适用于课程设计、期末大作… · 2026/9/27 0:00:01
汕头网站建设制作厂家避坑指南:5大注意事项救急 汕头网站建设制作厂家避坑指南:5大注意事项救急 改个需求建站公司拖一周,这种憋屈事我见得太多了。 很多汕头老板找本地建站团队,签合同前看着方案挺美,一上线就变脸。 今天不聊虚的,直接拆解找 汕头网站建设制作厂家 时的5个核心 注意事项… · 2026/9/27 0:00:01
多模态虚假新闻检测实战:BERT+ResNet双塔与对比学习 简介:基于PyTorch的多模态虚假新闻检测项目完整代码包,面向自然语言处理与计算机视觉交叉方向的开发者、科研人员及毕业设计选题者,解决社交媒体中文本与图像联合识别虚假新闻的问题。系统以BERT预训练模型提取文本语义特征,以Res… · 2026/9/27 0:00:01
MATLAB雷达信号脉冲压缩仿真:LFM线性调频、匹配滤波与距离分辨率实现 简介:这套Matlab仿真工具完整呈现雷达信号脉冲压缩过程,从线性调频(LFM)信号生成、目标回波仿真到匹配滤波压缩处理均有可运行代码支撑,面向电子信息工程、计算机、数学等专业学生,适用于课程设计、期末大作… · 2026/9/27 0:00:01
汕头网站建设制作厂家避坑指南:5大注意事项救急 汕头网站建设制作厂家避坑指南:5大注意事项救急 改个需求建站公司拖一周,这种憋屈事我见得太多了。 很多汕头老板找本地建站团队,签合同前看着方案挺美,一上线就变脸。 今天不聊虚的,直接拆解找 汕头网站建设制作厂家 时的5个核心 注意事项… · 2026/9/27 0:00:01
多模态虚假新闻检测实战:BERT+ResNet双塔与对比学习 简介:基于PyTorch的多模态虚假新闻检测项目完整代码包,面向自然语言处理与计算机视觉交叉方向的开发者、科研人员及毕业设计选题者,解决社交媒体中文本与图像联合识别虚假新闻的问题。系统以BERT预训练模型提取文本语义特征,以Res… · 2026/9/27 0:00:01