Skip to content

Instantly share code, notes, and snippets.

View Dwarfobserver's full-sized avatar

Sidney Congard Dwarfobserver

View GitHub Profile
@Dwarfobserver
Dwarfobserver / soa_aos_hybrid_bench.cpp
Last active April 5, 2020 18:29
Fast benchmark to compare aos, soa and hybrid iteration to update floats
// Compiled with mingw (on Windows) : -O3 -march=native
// Processor : core i5-6300HQ (with AVX2)
// Output for 100 iterations on 100'000'000 elements :
// structs function took 11.957 sseconds
// arrays function took 7.519 sseconds
// hybrid function took 1.654 sseconds
#include <chrono>
#include <iostream>
@Dwarfobserver
Dwarfobserver / num_vector.hpp
Last active August 21, 2018 11:43
Little math vector class draft
#pragma once
#include <array>
#include <cmath>
template <class Unit, size_t Size, template <class> class...Mixins>
class basic_vector : public Mixins<basic_vector<Unit, Size, Mixins...>>... {
using System.Drawing;
namespace TentacleSlicers
{
public interface IDrawable
{
void Draw(Position shift, Graphics g);
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4990C9C5-B41B-4E77-BEB6-46A1F94ACEA8}</ProjectGuid>
<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>