Code Monkey home page Code Monkey logo

libky2's Introduction

libky2

无任何依赖、高优化的C++基础应用库

建库原则:

1.任何实现都建立在无依赖基础之上
2.实现扩展机制遵循的标准:
  a.面向接口机制
  b.接口都实现为单一职责机制
  c.每个扩展统称为包的概念
  d.每个包内可以包含多个模块
  e.模块对外都采用面向接口机制
3.隔离系统底层实现

库实现的功能:

1.interface目录下为面向接口机制的定义
2.maths目录下为2/3D数学计算基础类
3.network目录下将实现有关所有网络功能类
4.tools目录下为基础算法和工具
5.基本功能:
  a.posix线程和基本锁操作
  b.系统原子操作
  c.内存屏障定义
  d.文件系统操作
  e.对象机制
  f.应用程序类,内部启动管理所有扩展包
  g.对象间可使用伪信号槽机制实现响应(采用委托机制实现)
6.算法功能:
  a.快速动态数组和容器
  b.位操作实现
  c.多元化颜色空间转换
  d.键值对(红黑数、哈希)
  e.2/3D图像操作类
  f.快速链表和双向链表
  g.字符串类(utf8/16/32)
  h.数据流操作

7.测试的算法介绍:
  算法复杂度遵循以下标准:
    insert   O(n)
    append   O(1)-near
    prepend  O(1)-near
    at       O(1)

  测试条件:
    执行10000000次int32操作,
    随机方法为执行循环时取i%1000
    操作系统ubuntu 16.04 64bit,linux内核4.4.0-112
    硬件 CPU i5-5200 内存 12GiB

  a.容器和动态数组
    添加操作 460ms
    前向添加 450ms
    随机插入 6100ms
  b.快速链表
    添加操作 390ms
    前向添加 430ms
    随机插入 8000ms
    随机访问 150ms
  c.双向链表
    添加操作 1200ms
    前向添加 1240ms
    随机插入 15400ms
    随机访问 740ms

libky2's People

Contributors

kuny-yti avatar

Stargazers

Kimbeaur avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.