DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: szliyu112358
今日帖子: 56
在线用户: 19
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2023/5/21 0:35:37
标题:
Faster Base64 Encoding/Decoding using AVX2 - Delphi 2010/Alexandria / FPC (x86/x64) ​ 浏览:681
加入我的收藏
楼主: Faster Base64 Encoding/Decoding using AVX2 - Delphi 2010++ / FPC (x86/x64) ​
by Mikerabat​
github: https://github.com/mikerabat/FastBase64

FastBase64​
Fast base 64 encoding/decoding using AVX2 extension.

The project is working with Delphi (2010 and up) and FPC in both intel flavors - x64 and x86. It is based on the paper "Faster Base64 Encoding and Decoding using AVX2 Instructions" by Lamire et al. and the great work on: GitHub - lemire/fastbase64: SIMD-accelerated base64 codecs . This one here is basically a pure ASM version of their work.

Usage​
To use the code one needs to add the "FastBase64.pas" file to the your project and add the source search path to the library path so the dependencies are loaded too. This enables AVX encoding/decoding in case the AVX2 instruction set is avaliabe.

Stats​
The files were tested against the standard Delphi implementation that is shipped via the great Indy library. I created a small benchmark app that shows that achieves up to 10 times faster encoding/decoding speed.

Design considerations​
The project could use global constants but the disassembler could not handle that well so there is another variable passed to the en/decoding routines that hold a pointer to the constants.

I basically used the disassembly routines from GitHub - mikerabat/mrmath: Delphi matrix library to get the equivalent "db instructions" for the AVX set that are missing up until Delphi 11.3.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2023/5/21 0:35:50
1楼: The project is working with Delphi (2010 and up) and FPC in both intel flavors - x64 and x86. It is based on the paper "Faster Base64 Encoding and Decoding using AVX2 Instructions" by Lamire et al. and the great work on: GitHub - lemire/fastbase64: SIMD-accelerated base64 codecs . This one here is basically a pure ASM version of their work.
https://github.com/lemire/fastbase64/


I basically used the disassembly routines from GitHub - mikerabat/mrmath: Delphi matrix library to get the equivalent "db instructions" for the AVX set that are missing up until Delphi 11.3.
https://github.com/mikerabat/mrmath
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行62.5毫秒 RSS