Skip to content

Instantly share code, notes, and snippets.

import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
class Worker implements Runnable {
private final float[] data;
private final int startPos;
Worker(float[] array, int start) {
startPos = start;
#include <iostream>
#include <thread>
#include <chrono>
#include <memory>
#include <vector>
#include <cmath>
#include <array>
#include <iterator>
constexpr int size = 100'000'000;
.file "hello.adb"
# GNU Ada (Ubuntu 4.9.3-3ubuntu5) version 4.9.3 (x86_64-linux-gnu)
# compiled by GNU C version 4.9.3, GMP version 6.1.0, MPFR version 3.1.3-p5, MPC version 1.0.3
# warning: MPFR header version 3.1.3-p5 differs from library version 3.1.4.
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed: -fverbose-asm -gnatez -gnatea -gnatez -mtune=generic
# -march=x86-64 hello.adb
# options enabled: -faggressive-loop-optimizations
# -fasynchronous-unwind-tables -fauto-inc-dec -fcommon
# -fdelete-dead-exceptions -fdelete-null-pointer-checks -fdwarf2-cfi-asm
#include <math.h>
#include <stdio.h>
float some = 0.0;
struct Foo {
float x[2];
//char name[1024*16];
float res;
//char name[1024*16];
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <o7c.h>
#include "CFiles.h"
let min_index a =
let rec min i m =
let m = if a.(i) < a.(m) then i else m in
if (Array.length a) == (i+1) then
m
else
min(i+1) m
in
Index (min 0 0)
let min_index a =
let min i m =
let m = if a.(i) < a.(m) then i else m in
if (Array.length a) == (i+1) then
m
else
min(i+1) m
in
Index (min 0 0)
MODULE BubbleTest;
CONST n = 40000;
PROCEDURE DoIt*;
VAR
arr : ARRAY n OF INTEGER;
time : INTEGER;
i, j, tmp : INTEGER;
BEGIN
$ cat bubble.s
.text
.file "bubble.cpp"
.globl _Z9print_allRKSt6vectorIiSaIiEE
.align 16, 0x90
.type _Z9print_allRKSt6vectorIiSaIiEE,@function
_Z9print_allRKSt6vectorIiSaIiEE: # @_Z9print_allRKSt6vectorIiSaIiEE
.cfi_startproc
# BB#0:
pushq %r15
package main
import "fmt"
import "sort"
import "os"
import "bufio"
import "strconv"
type B struct {
l, r, id int