This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| namespace csharpclarity | |
| { | |
| class Vector | |
| { | |
| public float x, y, z; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Vector | |
| { | |
| public float x, y, z; | |
| public Vector(float x, float y, float z) | |
| { | |
| this.x = x; | |
| this.y = y; | |
| this.z = z; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.sample; | |
| import org.openjdk.jmh.annotations.Benchmark; | |
| import org.openjdk.jmh.annotations.Scope; | |
| import org.openjdk.jmh.annotations.State; | |
| import org.openjdk.jmh.annotations.Setup; | |
| import org.openjdk.jmh.annotations.BenchmarkMode; | |
| import org.openjdk.jmh.annotations.Mode; | |
| import org.openjdk.jmh.annotations.OutputTimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.concurrent.TimeUnit; | |
| import java.util.Arrays; | |
| import java.util.Random; | |
| import java.lang.*; | |
| public class Speed { | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.sample; | |
| import org.openjdk.jmh.annotations.Benchmark; | |
| import org.openjdk.jmh.annotations.Scope; | |
| import org.openjdk.jmh.annotations.State; | |
| import org.openjdk.jmh.annotations.Setup; | |
| import org.openjdk.jmh.annotations.BenchmarkMode; | |
| import org.openjdk.jmh.annotations.Mode; | |
| import org.openjdk.jmh.annotations.OutputTimeUnit; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| namespace bettercraft | |
| { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Vector | |
| { | |
| public float x, y, z; | |
| public Vector(float x, float y, float z) | |
| { | |
| this.x = x; | |
| this.y = y; | |
| this.z = z; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // clarity.cpp : Defines the entry point for the console application. | |
| // | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <chrono> | |
| #include <thread> | |
| #include <math.h> | |
| #include <string> | |
| #include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <chrono> | |
| #include <thread> | |
| #include <cmath> | |
| #include <string> | |
| #include <vector> | |
| #include <array> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Implementation contributed by https://github.com/Maplicant | |
| // Optimized game implementation in Rust | |
| extern crate time; | |
| use time::precise_time_ns; | |
| use std::ops::{Add, Sub, Mul}; | |
| static NUM_BLOCKS: usize = 65535; | |
| static NUM_ENTITIES: usize = 1000; | |
| static CHUNK_COUNT: usize = 100; |