GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - robaho/cpp_fix_codec: ultra fast C++ FIX protocol encoder/decoder

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
Makefile
Makefile
 
 
Makefile.gcc
Makefile.gcc
 
 
README.md
README.md
 
 
benchmark_access_test.cpp
benchmark_access_test.cpp
 
 
benchmark_build_test.cpp
benchmark_build_test.cpp
 
 
benchmark_parse_test.cpp
benchmark_parse_test.cpp
 
 
compile_flags.txt
compile_flags.txt
 
 
fieldmap.cpp
fieldmap.cpp
 
 
fieldmap.h
fieldmap.h
 
 
fieldmap_test.cpp
fieldmap_test.cpp
 
 
fix.h
fix.h
 
 
fix_alloc.h
fix_alloc.h
 
 
fix_builder.cpp
fix_builder.cpp
 
 
fix_builder.h
fix_builder.h
 
 
fix_builder_test.cpp
fix_builder_test.cpp
 
 
fix_parser.cpp
fix_parser.cpp
 
 
fix_parser.h
fix_parser.h
 
 
fix_parser_test.cpp
fix_parser_test.cpp
 
 
samples.h
samples.h
 
 

Repository files navigation

Summary

This is a C++ implementation of a FIX protocol codec.

It uses cpp_fixed to perform fixed decimal point integer math.

Building

The project depends on the cpp_fixed project. It must be available at the same directory level (change the INCLUDES entry in the Makefile if it is in a different location).

The project builds by default using make and CLang. There is a Makefile.gcc for building using GCC.make

Design

The library is extremely low-level, designed for performance first. There is no automated FIX metadata. The consumer is responsible for defining the group layout of the messages it uses.

A custom arena based memory allocator is used, and any dynamic memory is reused when parsing the next message.

Nested groups are fully supported.

Testing

use make run_tests to run all of the test cases.

Performance

Using a 4 GHz Quad-Core Intel Core i7:

The library can parse more than 2.7M messages a second from a single istream. An istream is almost always required because the FIX connection is over TCP and the messages are not delineated.

Parsing messages with groups slows the parsing by 10%.

After parsing, the accessing of fields is performed at more than 55M a second.

The library can encode more than 4.5M typical "new order single" messages per second. With cached time values, this is more than 7.5M messages per second. Time conversion is typically slow so caching below the required accuracy is essential.

See the benchmark parsing
See the benchmark building

performance details
New Order Single: parsed 1000000 messages, usec per order 0.368897, orders per sec 2710783
New Order Single w/Groups: parsed 1000000 messages, usec per order 0.496595, orders per sec 2013713
built 10000000 messages, usec per msg 0.223333, msgs per sec 4477614
with cached time, built 10000000 messages, usec per msg 0.133145, msgs per sec 7510597

About

ultra fast C++ FIX protocol encoder/decoder

Topics

cppfixfix-protocoltrading

Resources

Readme
Activity

Stars

2 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.