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 <stdio.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <sys/inotify.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#define INOTIFY_TEST_PATH "/tmp/inotify_test.tmp" |
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 Haste | |
import Haste.App | |
import Haste.Foreign | |
server_func_1 :: Server (String) | |
server_func_1 = return "func1" | |
server_func_2 :: Server () | |
server_func_2 = return () |
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
<html> | |
<head> | |
</head> | |
<body> | |
Hello World | |
<script type="text/javascript" src="test.js"></script> | |
<script type="text/javascript"> | |
window.setTimeout(function(){ | |
Haste.hs_entry_point() | |
}, 1000) |
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
<html> | |
<head> | |
</head> | |
<body> | |
Hello World | |
<script type="text/javascript" src="test.js"></script> | |
<script type="text/javascript"> | |
window.setTimeout(function(){ | |
Haste.hs_entry_point("foo", "bar") | |
}, 1000) |
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
{-# LANGUAGE ForeignFunctionInterface #-} | |
import Haste | |
import Haste.App | |
import Haste.Foreign | |
anything :: Server () | |
anything = return () | |
entry_point :: String -> String -> IO () | |
entry_point regex_str lang = do |
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
.LBB0_10: # Parent Loop BB0_9 Depth=1 | |
# => This Inner Loop Header: Depth=2 | |
cltq | |
imulq $-2004318071, %rax, %rbp # imm = 0xFFFFFFFF88888889 | |
shrq $32, %rbp | |
movl %eax, %ebx | |
addl %ebp, %ebx | |
movl %ebx, %ebp | |
sarl $6, %ebp | |
movl %ebx, %edi |
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
.L13: | |
movl $-2004318071, %eax | |
movl $120, %esi | |
movl %ecx, %r11d | |
imull %ecx | |
movl %ecx, %eax | |
andl $1023, %r11d | |
sarl $31, %eax | |
leal (%rcx,%rcx), %r10d | |
leal (%rcx,%rbx), %r8d |
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
.LBB0_10: # Parent Loop BB0_9 Depth=1 | |
# => This Inner Loop Header: Depth=2 | |
movl %r8d, %ecx | |
movl $2290649225, %eax # imm = 0x88888889 | |
imulq %rcx, %rax | |
movq %rax, %rdi | |
shrq $38, %rdi | |
imull $120, %edi, %edi | |
movl %r8d, %r14d | |
subl %edi, %r14d |
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
.LBB0_10: # Parent Loop BB0_9 Depth=1 | |
# => This Inner Loop Header: Depth=2 | |
leal (%rdi,%rdi), %ecx | |
movl %edi, %eax | |
movl $2290649225, %r9d # imm = 0x88888889 | |
imulq %rax, %r9 | |
movq %r9, %r8 | |
shrq $38, %r8 | |
imull $120, %r8d, %edx | |
movl %edi, %r8d |
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
// c++ -std=c++11 -O3 sort.cpp ; ./a.out | |
// qsort: 674 ms | |
// std::sort: 1104 ms | |
#include <string.h> | |
#include <stdio.h> | |
#include <chrono> | |
#include <string> | |
#include <vector> | |
#include <iostream> |
OlderNewer