Comments (5)
另外,本质来说,XMM是为了解决那些想自己管理内存,提升程序性能,并不被GC影响性能的开发者和应用场景;如果一个CURD场景的,完全没必要使用XMM,内置的map/slice等基本就够用了。
XMM就是为了底层解决高性能以及自主内存可控制不会被GC影响等场景的问题存在的,就是为了弥补Go内置没有能够自己管理内存操作存在的。Go gc是一个大黑盒,几乎不暴露任何接口,对很多追求极致性能或者是想内存可控的程序员来说是非常痛苦的,只有自己遇到才会懂,所以才开发了XMM。
from xmm.
"我觉得超高性能场景就用rust或者c/c++ 吧"
我觉得 XMM 效果好的话还是有点用。
cgo接口性能是一个问题,另外 没人会写rust/c/c++的时候,先学后写太费时间了。
from xmm.
XMM主要场景是想要自主管理内存的场景,在Go中想要自主管理内存不经过GC是没办法的~ 只能字节流等等比较粗糙的方式,针对这种场景所以才开发了XMM。
XMM主要就是应对哪些从C++转到Go的想要自主管理内存,还有用Go无法管理内存想转到Rust的这些用户;
目前版本就是手动Free内存,不是不加上GC功能,是加了GC,就是跟go内置GC一样了,绕了一圈又回去了,所以才选择这种方式;
from xmm.
我觉得此库还挺有用的,1程序内缓存 像bigcache 要系列化反序列化,如果用此库就可以存储为go类型就可避免来回序列化,2.CGO场景 ,传给c的指针要避免被gc掉,用此库更好的与c结合
from xmm.
@bronze1man @jinsuojinsuo 是的,两位大佬理解是对的~
from xmm.
Related Issues (12)
- What's the tradeoff? HOT 6
- 请问适用场景 HOT 2
- 是否有对比实验证明这个库在某种tradeoff的情况下比golang自带的好?好多少? HOT 3
- 是否 windows,linux,mac 三者都支持 HOT 6
- 有新版本的发布计划吗 HOT 1
- xmm目前支持 Linux/Mac/FreeBSD,暂时不支持Windows,是指什么意思呢? HOT 2
- 看源码貌似不支持空结构体的分配 HOT 1
- Panic when concurrency alloc HOT 1
- Span lock state error when realloc, May overwrite by user's data? HOT 1
- 建议把src这一层目录拿掉 HOT 6
- bug: Incorrect package name causes dependency installation exception HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmm.